Skip to content

Commit

Permalink
Updating the MA tables in parameters.py and setting the default MAtab…
Browse files Browse the repository at this point in the history
…le to 4 in ris_make_utils.py
  • Loading branch information
eunkyuh committed Nov 20, 2024
1 parent b8856e9 commit 1a05862
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 25 deletions.
175 changes: 151 additions & 24 deletions romanisim/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,155 @@
from astropy.time import Time
from astropy import units as u

read_pattern = {1: [[1 + x for x in range(8)],
[9 + x for x in range(8)],
[17 + x for x in range(8)],
[25 + x for x in range(8)],
[33 + x for x in range(8)],
[41 + x for x in range(8)]],
2: [[1 + x for x in range(5)],
[6 + x for x in range(8)],
[14],
[15 + x for x in range(9)],
[24 + x for x in range(25)]],
3: [[1 + x for x in range(25)],
# read_pattern is updated to match PRD15
# MA tables 1(DEFOCUS_MOD), 2(DEFOCUS_LRG), and 18(DIAGNOSTIC) are excluded
read_pattern = {3: [[2], [5], [10], [16], [17]],
4: [[1], [2], [3, 4], [5, 6, 7, 8, 9],
[10 + x for x in range(8)],
[18 + x for x in range(8)],
[26 + x for x in range(8)],
[34],
[35 + x for x in range(14)]],
109: [[1], [2, 3], [5, 6, 7], [10, 11, 12, 13],
[15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26],
[27, 28, 29, 30, 31, 32], [33, 34, 35, 36, 37, 38],
[39, 40, 41, 42, 43], [44]],
110: [[1], [2, 3, 4], [5, 6, 7], [8, 9, 10], [11, 12, 13],
[14, 15, 16], [17, 18, 19], [20, 21, 22], [23, 24, 25],
[26, 27, 28], [29, 30, 31], [32, 33, 34], [35, 36, 37],
[38, 39, 40], [41, 42, 43], [44]],
[34 + x for x in range(8)], [42]],
5: [[1], [2], [3, 4], [5, 6, 7, 8, 9, 10],
[11 + x for x in range(6)],
[17 + x for x in range(6)],
[23 + x for x in range(6)],
[29 + x for x in range(6)],
[35 + x for x in range(8)],
[43 + x for x in range(8)],
[51 + x for x in range(10)], [61]],
6: [[1], [2], [3, 4], [5, 6, 7, 8, 9, 10],
[11 + x for x in range(6)],
[17 + x for x in range(6)],
[23 + x for x in range(7)],
[30 + x for x in range(8)],
[38 + x for x in range(8)],
[46 + x for x in range(8)],
[54 + x for x in range(8)],
[62 + x for x in range(10)],
[72 + x for x in range(10)],
[82 + x for x in range(10)], [92]],
7: [[1], [2], [3, 4],
[5 + x for x in range(8)],
[13 + x for x in range(8)],
[21 + x for x in range(10)],
[31 + x for x in range(10)],
[41 + x for x in range(10)],
[51 + x for x in range(12)],
[63 + x for x in range(12)],
[75 + x for x in range(12)],
[87 + x for x in range(12)],
[99 + x for x in range(12)],
[111 + x for x in range(12)], [123]],
8: [[1], [2], [3, 4],
[5 + x for x in range(8)],
[13 + x for x in range(8)],
[21 + x for x in range(10)],
[31 + x for x in range(12)],
[43 + x for x in range(16)],
[59 + x for x in range(16)],
[75 + x for x in range(16)],
[91 + x for x in range(16)],
[107 + x for x in range(16)],
[123 + x for x in range(16)],
[139 + x for x in range(16)], [155]],
9: [[1], [2], [3, 4], [5 + x for x in range(8)], [13 + x for x in range(8)],
[21 + x for x in range(12)],
[33 + x for x in range(12)],
[45 + x for x in range(12)],
[57 + x for x in range(16)],
[73 + x for x in range(16)],
[89 + x for x in range(16)],
[105 + x for x in range(16)],
[121 + x for x in range(32)],
[153 + x for x in range(32)], [185]],
10: [[1], [2], [3, 4], [5 + x for x in range(8)],
[13 + x for x in range(12)],
[25 + x for x in range(16)],
[41 + x for x in range(16)],
[57 + x for x in range(16)],
[73 + x for x in range(16)],
[89 + x for x in range(16)],
[105 + x for x in range(32)],
[137 + x for x in range(32)],
[169 + x for x in range(32)],
[201 + x for x in range(32)], [233]],
11: [[1], [2], [3, 4],
[5 + x for x in range(16)],
[21 + x for x in range(16)],
[37 + x for x in range(16)],
[53 + x for x in range(32)],
[85 + x for x in range(32)],
[117 + x for x in range(32)],
[149 + x for x in range(32)],
[181 + x for x in range(32)],
[213 + x for x in range(32)],
[245 + x for x in range(32)],
[277 + x for x in range(32)], [309]],
12: [[1, 2], [3, 4], [5, 6], [7, 8],
[9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20],
[21, 22, 23, 24], [25, 26, 27, 28], [29, 30, 31, 32],
[33, 34, 35, 36], [37, 38, 39, 40],
[41 + x for x in range(8)],
[49 + x for x in range(8)],
[57 + x for x in range(8)], [65]],
13: [[1, 2], [3, 4], [5, 6], [7, 8],
[9, 10, 11, 12], [13, 14, 15, 16, 17, 18],
[19, 20, 21, 22, 23, 24],
[25 + x for x in range(8)],
[33 + x for x in range(8)],
[41 + x for x in range(8)],
[49 + x for x in range(8)],
[57 + x for x in range(8)],
[65 + x for x in range(8)],
[73 + x for x in range(8)],
[81 + x for x in range(8)], [89]],
14: [[1, 2], [3, 4], [5, 6], [7, 8],
[9, 10, 11, 12],
[13, 14, 15, 16, 17, 18],
[19 + x for x in range(8)],
[27 + x for x in range(8)],
[35 + x for x in range(8)],
[43 + x for x in range(8)],
[51 + x for x in range(8)],
[59 + x for x in range(8)],
[67 + x for x in range(12)],
[79 + x for x in range(16)],
[95 + x for x in range(16)], [111]],
15: [[1, 2], [3, 4], [5, 6], [7, 8],
[9, 10, 11, 12],
[13 + x for x in range(14)],
[27 + x for x in range(8)],
[35 + x for x in range(12)],
[47 + x for x in range(12)],
[59 + x for x in range(12)],
[71 + x for x in range(16)],
[87 + x for x in range(16)],
[103 + x for x in range(16)],
[119 + x for x in range(16)], [135]],
16: [[1, 2], [3, 4], [5, 6], [7, 8],
[9 + x for x in range(8)],
[17 + x for x in range(8)],
[25 + x for x in range(16)],
[41 + x for x in range(16)],
[57 + x for x in range(16)],
[73 + x for x in range(16)],
[89 + x for x in range(16)],
[105 + x for x in range(16)],
[121 + x for x in range(16)],
[137 + x for x in range(16)],
[153 + x for x in range(16)], [169]],
17: [[1, 2], [3, 4], [5, 6], [7, 8],
[9, 10, 11, 12, 13, 14],
[15 + x for x in range(8)],
[23 + x for x in range(8)],
[31 + x for x in range(16)],
[47 + x for x in range(16)],
[63 + x for x in range(16)],
[79 + x for x in range(16)],
[95 + x for x in range(32)],
[127 + x for x in range(32)],
[159 + x for x in range(32)],
[191 + x for x in range(32)], [223]]
}

default_parameters_dictionary = {
Expand All @@ -37,8 +163,9 @@
},
'exposure': {'start_time': Time('2026-01-01T00:00:00'),
'type': 'WFI_IMAGE',
'ma_table_number': 1,
'read_pattern': read_pattern[1],
'ma_table_number': 4,
'read_pattern': read_pattern[4],
# Changing the default MA table to be 4 (C2A_IMG_HLWAS) as MA table 1 (DEFOCUS_MOD) is not supported
},
'pointing': {'target_ra': 270.0,
'target_dec': 66.0,
Expand Down
2 changes: 1 addition & 1 deletion romanisim/ris_make_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def merge_nested_dicts(dict1, dict2):


def set_metadata(meta=None, date=None, bandpass='F087', sca=7,
ma_table_number=1, truncate=None):
ma_table_number=4, truncate=None):
"""
Set / Update metadata parameters
Expand Down

0 comments on commit 1a05862

Please sign in to comment.