diff --git a/DREAMS.yaml b/DREAMS.yaml index ccde7bc..5577754 100644 --- a/DREAMS.yaml +++ b/DREAMS.yaml @@ -26,10 +26,10 @@ effects: kwargs : filename: "TER_atmosphere.dat" rescale_emission: - filter_name: "!OBS.sky.filter_name" - filename_format: "filters/{}.dat" - value: "!OBS.sky.bg_mag" - unit: mag + filter_name: "!OBS.sky.filter_name" + filename_format: "filters/J.dat" + value: "!OBS.sky.bg_mag" + unit: mag - name: dreams_static_surfaces description : telescope and camera optical surfaces class: SurfaceList @@ -44,4 +44,4 @@ effects: filename_format: "filters/{}.dat" minimum_throughput: !!float 1.01E-4 outer: 0.05088 - outer_unit: "m" \ No newline at end of file + outer_unit: "m" diff --git a/DREAMS_InGaAs.yaml b/DREAMS_InGaAs.yaml index a17ca2d..0f76a0f 100644 --- a/DREAMS_InGaAs.yaml +++ b/DREAMS_InGaAs.yaml @@ -6,7 +6,7 @@ name : DREAMS_InGaAs_detector description : base configuration for LFOA SBIG camera properties: - mage_plane_id : 0 + image_plane_id : 0 temperature : -60 dit : "!OBS.dit" ndit : "!OBS.ndit" @@ -37,7 +37,7 @@ effects: description : SBIG dark current class: DarkCurrent kwargs: - value: 67 + value: 67. - name: shot_noise description : apply Poisson shot noise to images @@ -59,4 +59,4 @@ effects: description : Binning the detector frames class : BinnedImage kwargs : - bin_size : "!DET.bin_size" \ No newline at end of file + bin_size : "!DET.bin_size" diff --git a/LIST_DREAMS_mirrors_static.dat b/LIST_DREAMS_mirrors_static.dat index 081d460..f0b17cf 100644 --- a/LIST_DREAMS_mirrors_static.dat +++ b/LIST_DREAMS_mirrors_static.dat @@ -6,5 +6,5 @@ # description : A list of optical surfaces in the telescope and camera. M[1-2] are the telescope mirrors. # name outer inner angle temperature action filename -M1 0.5 0.5 0 -40 reflection TER_mirror.dat +M1 0.5 0.0 0 -40 reflection TER_mirror.dat M2 0.5 0.0 0 -40 reflection TER_mirror.dat diff --git a/TER_atmosphere.dat b/TER_atmosphere.dat index 9db2786..196e6a4 100644 --- a/TER_atmosphere.dat +++ b/TER_atmosphere.dat @@ -3,6 +3,8 @@ # date_created : 2023-03-21 # location : Sidling spring # wavelength_unit : nm +# emission_unit : ph s-1 m-2 um-1 arcsec-2 +# action : transmission # # Details : http://www.gemini.edu/sciops/ObsProcess/obsConstraints/ocTransSpectra.html # @@ -293,3 +295,4 @@ wavelength transmission emission 1.0405 0.999979 0.1 1.041 0.999993 0.1 1.0415 0.999999 0.1 +1100 0.8745 0.1 diff --git a/default.yaml b/default.yaml index 348466c..8c09ab7 100644 --- a/default.yaml +++ b/default.yaml @@ -24,6 +24,7 @@ properties : bg_mag : 14.9 filter_name : J +--- ### default simulation parameters needed for DREAMS simulation object : simulation @@ -36,7 +37,7 @@ properties : seed : 9001 spectral : - wave_min : 1.17 + wave_min : 0.3 wave_mid : 1.25 wave_max : 1.33 diff --git a/filters/I.dat b/filters/I.dat new file mode 100644 index 0000000..dfc890f --- /dev/null +++ b/filters/I.dat @@ -0,0 +1,27 @@ +# source : Generic_Bessell.I SVO +# wavelength_unit : angstrom +# download_date : 2020-05-23 +wavelength transmission +7000.0 0.0000000000 +7100.0 0.0240000000 +7200.0 0.2320000000 +7300.0 0.5550000000 +7400.0 0.7850000000 +7500.0 0.9100000000 +7600.0 0.9650000000 +7700.0 0.9850000000 +7800.0 0.9900000000 +7900.0 0.9950000000 +8000.0 1.0000000000 +8100.0 1.0000000000 +8200.0 0.9900000000 +8300.0 0.9800000000 +8400.0 0.9500000000 +8500.0 0.9100000000 +8600.0 0.8600000000 +8700.0 0.7500000000 +8800.0 0.5600000000 +8900.0 0.3300000000 +9000.0 0.1500000000 +9100.0 0.0300000000 +9200.0 0.0000000000 diff --git a/gn.py b/gn.py index b16cc27..86248f2 100644 --- a/gn.py +++ b/gn.py @@ -40,11 +40,11 @@ def __init__(self): def test_load_lfao(self): cmd = scopesim.UserCommands(use_instrument="DREAMS", - properties={"!OBS.filter_name": "J", + properties={"!OBS.filter_name": "I", "!OBS.dit": 10, "!DET.bin_size": 1, "!OBS.sky.bg_mag": 14.9, - "!OBS.sky.filter_name": "J"}) + "!OBS.sky.filter_name": "I"}) opt = scopesim.OpticalTrain(cmd) opt["detector_linearity"].include = False assert isinstance(opt, scopesim.OpticalTrain) @@ -61,17 +61,18 @@ def test_load_lfao(self): def plot_data(self): if self.hdu_list is not None: - plt.imshow(self.hdu_list[1].data, norm=LogNorm()) - plt.colorbar() # Add a colorbar to the plot - plt.title("Observed Star Field") # Add a title to the plot - plt.xlabel("X Pixels") # Add an x-axis label - plt.ylabel("Y Pixels") # Add a y-axis label - plt.show() + for my_hdu in self.hdu_list[1:]: + plt.imshow(my_hdu.data, norm=LogNorm()) + plt.colorbar() # Add a colorbar to the plot + plt.title("Observed Star Field") # Add a title to the plot + plt.xlabel("X Pixels") # Add an x-axis label + plt.ylabel("Y Pixels") # Add a y-axis label + plt.show() def run_test_and_plot(): test_optical_train = TestMakeOpticalTrain() test_optical_train.test_load_lfao() - test_optical_train.plot_data() + # test_optical_train.plot_data() # Run the test and plot as soon as the module is imported run_test_and_plot()