Loading config/config_overall.yaml +4 −4 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # ok to pass either way or both, as long as they are consistent # work_dir: "/public/home/fangyuedong/project/workplace/" work_dir: "/home/yuedong/Work/CSST_sim/output/" run_name: "legacy_v1" run_name: "next_v1" data_set: "csst-msc-c11-1000sqdeg-wide-v1" # Project cycle and run counter are used to name the outputs Loading @@ -21,7 +21,7 @@ run_counter: 1 # Versioned detector definitions used by Chip and the readout simulation steps instrument_data: release: legacy-v1 release: next-v1 release_directory: null detector_overrides: {} Loading Loading @@ -113,8 +113,8 @@ psf_setting: # path to PSF data # NOTE: only valid for "Interp" PSF # PSF models for photometry survey simulation psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/set1_dynamic/" # psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/psfCube202607/" # psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/set1_dynamic/" psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/psfCube202607/" # PSF models for slitless spectrum survey simulation psf_sls_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/SLS_PSF_PCA_fp/" Loading config/obs_config_SCI.yaml +4 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ obs_id: "00000001" # this setting will only be used if pointing list file is not # Define list of chips # run_chips: [6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,23,24,25] # Photometric chips #run_chips: [1,2,3,4,5,10,21,26,27,28,29,30] # Spectroscopic chips run_chips: [8] run_chips: [7] # Define observation sequence call_sequence: Loading @@ -29,9 +29,9 @@ call_sequence: flat_fielding: YES field_dist: YES ghost_SCI: mag_threshold: 16 field_dist: YES # ghost_SCI: # mag_threshold: 16 # field_dist: YES # Accumulate fluxes from sky background sky_background: Loading csst_msc_instrument/definition_sets/next/1.0.0/readout_modes.yaml +148 −64 Original line number Diff line number Diff line Loading @@ -90,6 +90,27 @@ readout_modes: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_ccd290_99_1_f82: detector_family: science_ccd Loading Loading @@ -180,6 +201,27 @@ readout_modes: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_gm1201a_1a: Loading @@ -188,89 +230,110 @@ readout_modes: require_full_active_coverage: true channels: - id: CH01 detector_bbox: {x0: 0, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 0, width: 1154, height: 4620} detector_to_raw: identity scan: &gm_1a_edge_scan {serial_prescan: 27, serial_overscan: 28, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1209, height: 4646} - id: CH02 detector_bbox: {x0: 1153, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: &gm_1a_inner_scan {serial_prescan: 27, serial_overscan: 30, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 1208, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 0, width: 1209, height: 4646} - id: CH03 detector_bbox: {x0: 2306, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1209, height: 4646} - id: CH04 detector_bbox: {x0: 3459, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 0, width: 1209, height: 4646} - id: CH05 detector_bbox: {x0: 4612, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 0, width: 1209, height: 4646} - id: CH06 detector_bbox: {x0: 5764, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 0, width: 1209, height: 4646} - id: CH07 detector_bbox: {x0: 6916, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 0, width: 1209, height: 4646} - id: CH08 detector_bbox: {x0: 8068, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 0, width: 1154, height: 4620} detector_to_raw: flip_x scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 0, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 0, width: 1209, height: 4646} - id: CH09 detector_bbox: {x0: 0, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 4620, width: 1154, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1209, height: 4646} - id: CH10 detector_bbox: {x0: 1153, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 1208, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 4646, width: 1209, height: 4646} - id: CH11 detector_bbox: {x0: 2306, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1209, height: 4646} - id: CH12 detector_bbox: {x0: 3459, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 4646, width: 1209, height: 4646} - id: CH13 detector_bbox: {x0: 4612, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 4646, width: 1209, height: 4646} - id: CH14 detector_bbox: {x0: 5764, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 4646, width: 1209, height: 4646} - id: CH15 detector_bbox: {x0: 6916, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 4646, width: 1209, height: 4646} - id: CH16 detector_bbox: {x0: 8068, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 4620, width: 1154, height: 4620} detector_to_raw: flip_y scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 4646, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 4646, width: 1209, height: 4646} raw_output: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_gm1201a_1b: detector_family: science_ccd Loading @@ -278,89 +341,110 @@ readout_modes: require_full_active_coverage: true channels: - id: CH01 detector_bbox: {x0: 0, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 0, width: 1154, height: 4620} detector_to_raw: identity scan: &gm_1b_edge_scan {serial_prescan: 27, serial_overscan: 28, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1209, height: 4646} - id: CH02 detector_bbox: {x0: 1153, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: &gm_1b_inner_scan {serial_prescan: 27, serial_overscan: 30, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 1208, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 0, width: 1209, height: 4646} - id: CH03 detector_bbox: {x0: 2306, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1209, height: 4646} - id: CH04 detector_bbox: {x0: 3459, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 0, width: 1209, height: 4646} - id: CH05 detector_bbox: {x0: 4612, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 0, width: 1209, height: 4646} - id: CH06 detector_bbox: {x0: 5764, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 0, width: 1209, height: 4646} - id: CH07 detector_bbox: {x0: 6916, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 0, width: 1209, height: 4646} - id: CH08 detector_bbox: {x0: 8068, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 0, width: 1154, height: 4620} detector_to_raw: flip_x scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 0, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 0, width: 1209, height: 4646} - id: CH09 detector_bbox: {x0: 0, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 4620, width: 1154, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1209, height: 4646} - id: CH10 detector_bbox: {x0: 1153, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 1208, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 4646, width: 1209, height: 4646} - id: CH11 detector_bbox: {x0: 2306, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1209, height: 4646} - id: CH12 detector_bbox: {x0: 3459, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 4646, width: 1209, height: 4646} - id: CH13 detector_bbox: {x0: 4612, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 4646, width: 1209, height: 4646} - id: CH14 detector_bbox: {x0: 5764, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 4646, width: 1209, height: 4646} - id: CH15 detector_bbox: {x0: 6916, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 4646, width: 1209, height: 4646} - id: CH16 detector_bbox: {x0: 8068, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 4620, width: 1154, height: 4620} detector_to_raw: flip_y scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 4646, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 4646, width: 1209, height: 4646} raw_output: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} fgs_16ch_legacy: Loading tests/test_detector_model.py +83 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,89 @@ def test_next_release_has_calibrated_science_responses_and_unchanged_fgs() -> No assert draft_fgs == legacy_fgs def test_next_gm1201a_channel_and_raw_dimensions() -> None: draft = InstrumentRepository.load_builtin("next-v1") corner_channels = {"CH01", "CH08", "CH09", "CH16"} for mode_id in ("science_gm1201a_1a", "science_gm1201a_1b"): mode = draft.readout_modes.readout_modes[mode_id] assert mode.require_full_active_coverage is True assert mode.raw_output.mosaic_shape.model_dump() == { "columns": 9672, "rows": 9292, } for index, channel in enumerate(mode.channels): expected_detector_shape = ( {"width": 1154, "height": 4620} if channel.id in corner_channels else {"width": 1152, "height": 4620} ) assert { "width": channel.detector_bbox.width, "height": channel.detector_bbox.height, } == expected_detector_shape assert channel.raw_shape.model_dump() == { "columns": 1209, "rows": 4646, } assert channel.raw_mosaic_bbox is not None assert channel.raw_mosaic_bbox.model_dump() == { "x0": (index % 8) * 1209, "y0": (index // 8) * 4646, "width": 1209, "height": 4646, } def test_next_readout_modes_define_one_by_sixteen_formatted_outputs() -> None: draft = InstrumentRepository.load_builtin("next-v1") channel_order = ( "CH01", "CH02", "CH03", "CH04", "CH05", "CH06", "CH07", "CH08", "CH16", "CH15", "CH14", "CH13", "CH12", "CH11", "CH10", "CH09", ) expected_raw_shapes = { "science_ccd290_99_1_f24": (1209, 4646), "science_ccd290_99_1_f82": (1209, 4646), "science_gm1201a_1a": (1209, 4646), "science_gm1201a_1b": (1209, 4646), "fgs_16ch_legacy": (1506, 3924), } for mode_id, (channel_width, channel_height) in expected_raw_shapes.items(): mode = draft.readout_modes.readout_modes[mode_id] formatted = mode.formatted_output assert formatted is not None assert formatted.mosaic_shape.model_dump() == { "columns": 16 * channel_width, "rows": channel_height, } assert formatted.channel_order == channel_order for index, channel_id in enumerate(channel_order): assert formatted.channel_placements[channel_id].model_dump() == { "x0": index * channel_width, "y0": 0, "width": channel_width, "height": channel_height, } def test_filter_catalogs_and_reference_versions_follow_the_composition() -> None: legacy = InstrumentRepository.load_builtin("legacy-v1") draft = InstrumentRepository.load_builtin("next-v1") Loading Loading
config/config_overall.yaml +4 −4 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # ok to pass either way or both, as long as they are consistent # work_dir: "/public/home/fangyuedong/project/workplace/" work_dir: "/home/yuedong/Work/CSST_sim/output/" run_name: "legacy_v1" run_name: "next_v1" data_set: "csst-msc-c11-1000sqdeg-wide-v1" # Project cycle and run counter are used to name the outputs Loading @@ -21,7 +21,7 @@ run_counter: 1 # Versioned detector definitions used by Chip and the readout simulation steps instrument_data: release: legacy-v1 release: next-v1 release_directory: null detector_overrides: {} Loading Loading @@ -113,8 +113,8 @@ psf_setting: # path to PSF data # NOTE: only valid for "Interp" PSF # PSF models for photometry survey simulation psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/set1_dynamic/" # psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/psfCube202607/" # psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/set1_dynamic/" psf_pho_dir: "/home/yuedong/Work/CSST_sim/input_data/psfCube202607/" # PSF models for slitless spectrum survey simulation psf_sls_dir: "/home/yuedong/Work/CSST_sim/input_data/PSFCube/SLS_PSF_PCA_fp/" Loading
config/obs_config_SCI.yaml +4 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ obs_id: "00000001" # this setting will only be used if pointing list file is not # Define list of chips # run_chips: [6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,23,24,25] # Photometric chips #run_chips: [1,2,3,4,5,10,21,26,27,28,29,30] # Spectroscopic chips run_chips: [8] run_chips: [7] # Define observation sequence call_sequence: Loading @@ -29,9 +29,9 @@ call_sequence: flat_fielding: YES field_dist: YES ghost_SCI: mag_threshold: 16 field_dist: YES # ghost_SCI: # mag_threshold: 16 # field_dist: YES # Accumulate fluxes from sky background sky_background: Loading
csst_msc_instrument/definition_sets/next/1.0.0/readout_modes.yaml +148 −64 Original line number Diff line number Diff line Loading @@ -90,6 +90,27 @@ readout_modes: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_ccd290_99_1_f82: detector_family: science_ccd Loading Loading @@ -180,6 +201,27 @@ readout_modes: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_gm1201a_1a: Loading @@ -188,89 +230,110 @@ readout_modes: require_full_active_coverage: true channels: - id: CH01 detector_bbox: {x0: 0, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 0, width: 1154, height: 4620} detector_to_raw: identity scan: &gm_1a_edge_scan {serial_prescan: 27, serial_overscan: 28, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1209, height: 4646} - id: CH02 detector_bbox: {x0: 1153, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: &gm_1a_inner_scan {serial_prescan: 27, serial_overscan: 30, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 1208, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 0, width: 1209, height: 4646} - id: CH03 detector_bbox: {x0: 2306, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1209, height: 4646} - id: CH04 detector_bbox: {x0: 3459, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 0, width: 1209, height: 4646} - id: CH05 detector_bbox: {x0: 4612, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 0, width: 1209, height: 4646} - id: CH06 detector_bbox: {x0: 5764, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 0, width: 1209, height: 4646} - id: CH07 detector_bbox: {x0: 6916, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 0, width: 1209, height: 4646} - id: CH08 detector_bbox: {x0: 8068, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 0, width: 1154, height: 4620} detector_to_raw: flip_x scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 0, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 0, width: 1209, height: 4646} - id: CH09 detector_bbox: {x0: 0, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 4620, width: 1154, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1209, height: 4646} - id: CH10 detector_bbox: {x0: 1153, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 1208, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 4646, width: 1209, height: 4646} - id: CH11 detector_bbox: {x0: 2306, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1209, height: 4646} - id: CH12 detector_bbox: {x0: 3459, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 4646, width: 1209, height: 4646} - id: CH13 detector_bbox: {x0: 4612, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 4646, width: 1209, height: 4646} - id: CH14 detector_bbox: {x0: 5764, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 4646, width: 1209, height: 4646} - id: CH15 detector_bbox: {x0: 6916, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1a_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 4646, width: 1209, height: 4646} - id: CH16 detector_bbox: {x0: 8068, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 4620, width: 1154, height: 4620} detector_to_raw: flip_y scan: *gm_1a_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 4646, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 4646, width: 1209, height: 4646} raw_output: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} science_gm1201a_1b: detector_family: science_ccd Loading @@ -278,89 +341,110 @@ readout_modes: require_full_active_coverage: true channels: - id: CH01 detector_bbox: {x0: 0, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 0, width: 1154, height: 4620} detector_to_raw: identity scan: &gm_1b_edge_scan {serial_prescan: 27, serial_overscan: 28, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 0, width: 1209, height: 4646} - id: CH02 detector_bbox: {x0: 1153, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: &gm_1b_inner_scan {serial_prescan: 27, serial_overscan: 30, parallel_prescan: 15, parallel_overscan: 11} raw_mosaic_bbox: {x0: 1208, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 0, width: 1209, height: 4646} - id: CH03 detector_bbox: {x0: 2306, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 0, width: 1209, height: 4646} - id: CH04 detector_bbox: {x0: 3459, y0: 0, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 0, width: 1152, height: 4620} detector_to_raw: identity scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 0, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 0, width: 1209, height: 4646} - id: CH05 detector_bbox: {x0: 4612, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 0, width: 1209, height: 4646} - id: CH06 detector_bbox: {x0: 5764, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 0, width: 1209, height: 4646} - id: CH07 detector_bbox: {x0: 6916, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 0, width: 1152, height: 4620} detector_to_raw: flip_x scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 0, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 0, width: 1209, height: 4646} - id: CH08 detector_bbox: {x0: 8068, y0: 0, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 0, width: 1154, height: 4620} detector_to_raw: flip_x scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 0, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 0, width: 1209, height: 4646} - id: CH09 detector_bbox: {x0: 0, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 0, y0: 4620, width: 1154, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1208, height: 4646} raw_mosaic_bbox: {x0: 0, y0: 4646, width: 1209, height: 4646} - id: CH10 detector_bbox: {x0: 1153, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 1154, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 1208, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 1209, y0: 4646, width: 1209, height: 4646} - id: CH11 detector_bbox: {x0: 2306, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 2306, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 2418, y0: 4646, width: 1209, height: 4646} - id: CH12 detector_bbox: {x0: 3459, y0: 4620, width: 1153, height: 4620} detector_bbox: {x0: 3458, y0: 4620, width: 1152, height: 4620} detector_to_raw: rotate_180 scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 3628, y0: 4646, width: 1210, height: 4646} raw_mosaic_bbox: {x0: 3627, y0: 4646, width: 1209, height: 4646} - id: CH13 detector_bbox: {x0: 4612, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 4610, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 4838, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 4836, y0: 4646, width: 1209, height: 4646} - id: CH14 detector_bbox: {x0: 5764, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 5762, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 6047, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 6045, y0: 4646, width: 1209, height: 4646} - id: CH15 detector_bbox: {x0: 6916, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 6914, y0: 4620, width: 1152, height: 4620} detector_to_raw: flip_y scan: *gm_1b_inner_scan raw_mosaic_bbox: {x0: 7256, y0: 4646, width: 1209, height: 4646} raw_mosaic_bbox: {x0: 7254, y0: 4646, width: 1209, height: 4646} - id: CH16 detector_bbox: {x0: 8068, y0: 4620, width: 1152, height: 4620} detector_bbox: {x0: 8066, y0: 4620, width: 1154, height: 4620} detector_to_raw: flip_y scan: *gm_1b_edge_scan raw_mosaic_bbox: {x0: 8465, y0: 4646, width: 1207, height: 4646} raw_mosaic_bbox: {x0: 8463, y0: 4646, width: 1209, height: 4646} raw_output: layout: single_mosaic mosaic_shape: {columns: 9672, rows: 9292} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] formatted_output: layout: single_mosaic mosaic_shape: {columns: 19344, rows: 4646} channel_order: [CH01, CH02, CH03, CH04, CH05, CH06, CH07, CH08, CH16, CH15, CH14, CH13, CH12, CH11, CH10, CH09] channel_placements: CH01: {x0: 0, y0: 0, width: 1209, height: 4646} CH02: {x0: 1209, y0: 0, width: 1209, height: 4646} CH03: {x0: 2418, y0: 0, width: 1209, height: 4646} CH04: {x0: 3627, y0: 0, width: 1209, height: 4646} CH05: {x0: 4836, y0: 0, width: 1209, height: 4646} CH06: {x0: 6045, y0: 0, width: 1209, height: 4646} CH07: {x0: 7254, y0: 0, width: 1209, height: 4646} CH08: {x0: 8463, y0: 0, width: 1209, height: 4646} CH16: {x0: 9672, y0: 0, width: 1209, height: 4646} CH15: {x0: 10881, y0: 0, width: 1209, height: 4646} CH14: {x0: 12090, y0: 0, width: 1209, height: 4646} CH13: {x0: 13299, y0: 0, width: 1209, height: 4646} CH12: {x0: 14508, y0: 0, width: 1209, height: 4646} CH11: {x0: 15717, y0: 0, width: 1209, height: 4646} CH10: {x0: 16926, y0: 0, width: 1209, height: 4646} CH09: {x0: 18135, y0: 0, width: 1209, height: 4646} fgs_16ch_legacy: Loading
tests/test_detector_model.py +83 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,89 @@ def test_next_release_has_calibrated_science_responses_and_unchanged_fgs() -> No assert draft_fgs == legacy_fgs def test_next_gm1201a_channel_and_raw_dimensions() -> None: draft = InstrumentRepository.load_builtin("next-v1") corner_channels = {"CH01", "CH08", "CH09", "CH16"} for mode_id in ("science_gm1201a_1a", "science_gm1201a_1b"): mode = draft.readout_modes.readout_modes[mode_id] assert mode.require_full_active_coverage is True assert mode.raw_output.mosaic_shape.model_dump() == { "columns": 9672, "rows": 9292, } for index, channel in enumerate(mode.channels): expected_detector_shape = ( {"width": 1154, "height": 4620} if channel.id in corner_channels else {"width": 1152, "height": 4620} ) assert { "width": channel.detector_bbox.width, "height": channel.detector_bbox.height, } == expected_detector_shape assert channel.raw_shape.model_dump() == { "columns": 1209, "rows": 4646, } assert channel.raw_mosaic_bbox is not None assert channel.raw_mosaic_bbox.model_dump() == { "x0": (index % 8) * 1209, "y0": (index // 8) * 4646, "width": 1209, "height": 4646, } def test_next_readout_modes_define_one_by_sixteen_formatted_outputs() -> None: draft = InstrumentRepository.load_builtin("next-v1") channel_order = ( "CH01", "CH02", "CH03", "CH04", "CH05", "CH06", "CH07", "CH08", "CH16", "CH15", "CH14", "CH13", "CH12", "CH11", "CH10", "CH09", ) expected_raw_shapes = { "science_ccd290_99_1_f24": (1209, 4646), "science_ccd290_99_1_f82": (1209, 4646), "science_gm1201a_1a": (1209, 4646), "science_gm1201a_1b": (1209, 4646), "fgs_16ch_legacy": (1506, 3924), } for mode_id, (channel_width, channel_height) in expected_raw_shapes.items(): mode = draft.readout_modes.readout_modes[mode_id] formatted = mode.formatted_output assert formatted is not None assert formatted.mosaic_shape.model_dump() == { "columns": 16 * channel_width, "rows": channel_height, } assert formatted.channel_order == channel_order for index, channel_id in enumerate(channel_order): assert formatted.channel_placements[channel_id].model_dump() == { "x0": index * channel_width, "y0": 0, "width": channel_width, "height": channel_height, } def test_filter_catalogs_and_reference_versions_follow_the_composition() -> None: legacy = InstrumentRepository.load_builtin("legacy-v1") draft = InstrumentRepository.load_builtin("next-v1") Loading