|
1 | | -# Default settings for roman simulation |
2 | | -# Includes creation of noisless oversampled images (including PSF) |
3 | | -# -- processing of other detector and instrument effects are still handled in the |
4 | | -# python postprocessing layer to enable things not currently in galsim.roman |
5 | | - |
| 1 | +# Import just roman_imsim so we can access the registered template |
6 | 2 | modules: |
7 | | - |
8 | | - # Including galsim.roman in the list of modules to import will add a number of Roman-specific |
9 | | - # functions and classes that we will use here. |
10 | 3 | - roman_imsim |
11 | | - - galsim.roman |
12 | | - |
13 | | - # We need this for one of our Eval items. GalSim does not by default import datetime into |
14 | | - # the globals dict it uses when evaluating Eval items, so we can tell it to import it here. |
15 | | - - datetime |
16 | | - |
17 | | -# Define some other information about the images |
18 | | -image: |
19 | | - |
20 | | - # A special Image type that knows all the Roman SCA geometry, WCS, gain, etc. |
21 | | - # It also by default applies a number of detector effects, but these can be turned |
22 | | - # off if desired by setting some parameters (given below) to False. |
23 | | - type: roman_sca |
24 | | - |
25 | | - wcs: |
26 | | - type: RomanWCS |
27 | | - SCA: '@image.SCA' |
28 | | - ra: { type: ObSeqData, field: ra } |
29 | | - dec: { type: ObSeqData, field: dec } |
30 | | - pa: { type: ObSeqData, field: pa } |
31 | | - mjd: { type: ObSeqData, field: mjd } |
32 | | - |
33 | | - index_convention: 0 |
34 | | - |
35 | | - bandpass: |
36 | | - type: RomanBandpass |
37 | | - name: { type: ObSeqData, field: filter } |
38 | | - |
39 | | - # When you want to have multiple images generate the same random galaxies, then |
40 | | - # you can set up multiple random number generators with different update cadences |
41 | | - # by making random_seed a list. |
42 | | - # The default behavior is just to have the random seeds for each object go in order by |
43 | | - # object number across all images, but this shows how to set it up so we use two separate |
44 | | - # cadences. |
45 | | - # The first one behaves normally, which will be used for things like noise on the image. |
46 | | - # The second one sets the initial seed for each object to repeat to the same starting value |
47 | | - # at the start of each filter. If we were doing more than 3 total files, it would then |
48 | | - # move on to another sequence for the next 3 and so on. |
49 | | - random_seed: |
50 | | - # Used for noise and nobjects. |
51 | | - - { type: ObSeqData, field: visit } |
52 | | - |
53 | | - # Used for objects. Repeats sequence for each filter |
54 | | - # Note: Don't use $ shorthand here, since that will implicitly be evaluated once and then |
55 | | - # treated the same way as an integer (i.e. making a regular sequence starting from that |
56 | | - # value). Using an explicit dict with an Eval type means GalSim will leave it alone and |
57 | | - # evaluate it as is for each object. |
58 | | - |
59 | | - |
60 | | - # We're just doing one SCA here. |
61 | | - # If you wanted to do all of them in each of three filters (given below), you could use: |
62 | | - # |
63 | | - # SCA: |
64 | | - # type: Sequence |
65 | | - # first: 1 |
66 | | - # last: 18 |
67 | | - # repeat: 3 # repeat each SCA num 3 times before moving on, for the 3 filters. |
68 | | - # |
69 | | - SCA: 5 |
70 | | - mjd: { type: ObSeqData, field: mjd } |
71 | | - filter: { type: ObSeqData, field: filter } |
72 | | - exptime: { type: ObSeqData, field: exptime } |
73 | | - |
74 | | - draw_method: 'phot' |
75 | | - # Photon shooting is way faster for chromatic objects than fft, especially when most of them |
76 | | - # are fairly faint. The cross-over point for achromatic objects is generally of order |
77 | | - # flux=1.e6 or so (depending on the profile). Most of our objects here are much fainter than |
78 | | - # that. The fft rendering for chromatic is a factor of 10 or so slower still, whereas |
79 | | - # chromatic photon shooting is only slighly slower than achromatic, so the difference |
80 | | - # is even more pronounced in this case. |
81 | | - use_fft_bright: True |
82 | | - |
83 | | - noise: |
84 | | - # # These are all by default turned on, but you can turn any of them off if desired: |
85 | | - # type: RomanNoise |
86 | | - # stray_light: True |
87 | | - # thermal_background: True |
88 | | - # reciprocity_failure: True |
89 | | - # dark_current: True |
90 | | - # nonlinearity: True |
91 | | - # ipc: True |
92 | | - # read_noise: True |
93 | | - # sky_subtract: False |
94 | | - |
95 | | - type: NoNoise |
96 | | - |
97 | | - index_convention: 0 |
98 | | - nobjects: 10 |
99 | | - |
100 | | -stamp: |
101 | | - type: Roman_stamp |
102 | | - world_pos: |
103 | | - type: SkyCatWorldPos |
104 | | - exptime: { type: ObSeqData, field: exptime } |
105 | | - skip_failures: True |
106 | | - photon_ops: |
107 | | - - |
108 | | - type: ChargeDiff |
109 | | - |
110 | | -# psf: |
111 | | -# type: roman_psf |
112 | | -# # If omitted, it would figure this out automatically, because we are using the RomanSCA image |
113 | | -# # type. But if we weren't, you'd have to tell it which SCA to build the PSF for. |
114 | | -# SCA: '@image.SCA' |
115 | | -# # n_waves defines how finely to sample the PSF profile over the bandpass. |
116 | | -# # Using 10 wavelengths usually gives decent accuracy. |
117 | | -# n_waves: 10 |
118 | | - |
119 | | -# Define the galaxy type and positions to use |
120 | | -gal: |
121 | | - type: SkyCatObj |
122 | | - |
123 | | -input: |
124 | | - obseq_data: |
125 | | - file_name: Roman_WAS_obseq_11_1_23.fits |
126 | | - visit: 12909 |
127 | | - SCA: '@image.SCA' |
128 | | - roman_psf: |
129 | | - SCA: '@image.SCA' |
130 | | - n_waves: 5 |
131 | | - sky_catalog: |
132 | | - file_name: skyCatalog//skyCatalog.yaml |
133 | | - edge_pix: 512 |
134 | | - mjd: { type: ObSeqData, field: mjd } |
135 | | - exptime: { type: ObSeqData, field: exptime } |
136 | | - obj_types: ['diffsky_galaxy','star','snana'] |
137 | | - |
138 | | -output: |
139 | 4 |
|
140 | | - #type: Fits |
141 | | - type: RomanASDF |
142 | | - nfiles: 1 |
143 | | - dir: output/RomanWAS_new/images/truth |
144 | | - include_raw_header: true |
145 | | - file_name: |
146 | | - type: FormattedStr |
147 | | - #format: "Roman_WAS_truth_%s_%i_%i.fits.gz" |
148 | | - format: "Roman_WAS_truth_%s_%i_%i.asdf" |
149 | | - items: |
150 | | - - { type: ObSeqData, field: filter } |
151 | | - - { type: ObSeqData, field: visit } |
152 | | - - '@image.SCA' |
| 5 | +# Start with the default.yaml file, which we will modify below |
| 6 | +template: roman_imsim_default |
153 | 7 |
|
154 | | - truth: |
155 | | - dir: output/RomanWAS_new/truth |
156 | | - file_name: |
157 | | - type: FormattedStr |
158 | | - format: "Roman_WAS_index_%s_%i_%i.txt" |
159 | | - items: |
160 | | - - { type: ObSeqData, field: filter } |
161 | | - - { type: ObSeqData, field: visit } |
162 | | - - '@image.SCA' |
163 | | - columns: |
164 | | - object_id: "@object_id" |
165 | | - ra: "$sky_pos.ra.deg" |
166 | | - dec: "$sky_pos.dec.deg" |
167 | | - x: "$image_pos.x" |
168 | | - y: "$image_pos.y" |
169 | | - realized_flux: "@realized_flux" |
170 | | - flux: "@flux" |
171 | | - mag: "@mag" |
172 | | - obj_type: "@object_type" |
| 8 | +output.type: RomanASDF |
| 9 | +output.file_name.format: "Roman_WAS_truth_%s_%i_%i.asdf" |
0 commit comments