Skip to content

Commit

Permalink
catch fields with cadence = none
Browse files Browse the repository at this point in the history
  • Loading branch information
imedan committed Sep 5, 2024
1 parent 603a994 commit 50fcce2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/RS_to_targetdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
allocate_file = allocate_file.replace('final', 'catchup').replace('Final', 'Catchup%s' % ver_catch)
rsAllocation1 = fits.open(allocate_file)[1].data

# do not include fields we are no observing (cadence = none)
rsAllocation1 = rsAllocation1[rsAllocation1['cadence'] != 'none']

# get the instrument pks
instr_pks = {}
instr_pks['BOSS'] = targetdb.Instrument.get(label='BOSS').pk
Expand Down
6 changes: 6 additions & 0 deletions bin/validate_designs_batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ def valid_design_func(file, exp, obsTime, field_desmodes,
# only grab unique fields for this
rsAllocation1 = fits.open(allocate_file)[1].data

# do not include fields we are no observing (cadence = none)
rsAllocation1 = rsAllocation1[rsAllocation1['cadence'] != 'none']

fieldids = np.unique(rsAllocation1["fieldid"])

rs_fieldids = np.unique(rsAllocation1["rs_fieldid"])
Expand Down Expand Up @@ -520,6 +523,9 @@ def valid_design_func(file, exp, obsTime, field_desmodes,
# only grab unique fields for this
rsAllocation1 = fits.open(allocate_file)[1].data

# do not include fields we are no observing (cadence = none)
rsAllocation1 = rsAllocation1[rsAllocation1['cadence'] != 'none']

fieldids = np.unique(rsAllocation1["fieldid"])

rs_fieldids = np.unique(rsAllocation1["rs_fieldid"])
Expand Down

0 comments on commit 50fcce2

Please sign in to comment.