Changeset 9699 for trunk/psModules/src/camera/pmFPAConstruct.c
- Timestamp:
- Oct 20, 2006, 5:26:12 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAConstruct.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAConstruct.c
r9588 r9699 797 797 798 798 799 // Print spaces to indent 800 #define INDENT(FILE, LEVEL) \ 801 { \ 802 for (int i = 0; i < (LEVEL); i++) { \ 803 fprintf(FILE, " "); \ 804 } \ 805 } 806 799 807 void pmFPAPrint(FILE *fd, const pmFPA *fpa, bool header, bool concepts) 800 808 { 801 809 PS_ASSERT_PTR_NON_NULL(fpa,); 802 810 803 psTrace("psModules.camera", 1, "FPA:\n"); 811 IDENT(fd, 1); 812 fprintf(fd, 1, "FPA:\n"); 804 813 if (fpa->hdu) { 805 814 pmHDUPrint(fd, fpa->hdu, 2, header); … … 812 821 // Iterate over the FPA 813 822 for (int i = 0; i < chips->n; i++) { 814 psTrace("psModules.camera", 3, "Chip: %d\n", i); 823 INDENT(fd, 3); 824 fprintf(fd, "Chip: %d\n", i); 815 825 pmChip *chip = chips->data[i]; // The chip 816 826 if (chip->hdu) { … … 824 834 psArray *cells = chip->cells; // Array of cells 825 835 for (int j = 0; j < cells->n; j++) { 826 psTrace("psModules.camera", 5, "Cell: %d\n", j); 836 INDENT(fd, 5); 837 fprintf(fd, "Cell: %d\n", j); 827 838 pmCell *cell = cells->data[j]; // The cell 828 839 if (cell->hdu) { … … 836 847 for (int k = 0; k < readouts->n; k++) { 837 848 pmReadout *readout = readouts->data[k]; // The readout 838 psTrace("psModules.camera", 6, "Readout %d:\n", k); 839 psTrace("psModules.camera", 7, "row0: %d\n", readout->row0); 840 psTrace("psModules.camera", 7, "col0: %d\n", readout->col0); 849 INDENT(fd, 6); 850 fprintf(fd, "Readout %d:\n", k); 851 INDENT(fd, 7); 852 fprintf(fd, "col0: %d\n", readout->col0); 853 INDENT(fd, 7); 854 fprintf(fd, "row0: %d\n", readout->row0); 841 855 psImage *image = readout->image; // The image 842 856 psList *bias = readout->bias; // The list of bias images 843 857 if (image) { 844 psTrace("psModules.camera", 7, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 + 858 INDENT(fd, 7); 859 fprintf(fd, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 + 845 860 image->numCols, image->row0, image->row0 + image->numRows, image->numCols, 846 861 image->numRows); … … 850 865 psImage *biasImage = NULL; // Bias image from iteration 851 866 while ((biasImage = psListGetAndIncrement(biasIter))) { 852 psTrace("psModules.camera", 7, "Bias: [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0, 867 INDENT(fd, 7); 868 fprintf(fd, "Bias: [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0, 853 869 biasImage->col0 + biasImage->numCols, biasImage->row0, 854 870 biasImage->row0 + biasImage->numRows, biasImage->numCols, biasImage->numRows);
Note:
See TracChangeset
for help on using the changeset viewer.
