Skip to content

Commit

Permalink
Bright Standard Selection for MWM
Browse files Browse the repository at this point in the history
Sean-Morrison committed Oct 8, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 9653141 commit 3aca381
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pro/rm/rm_spflux_v5.pro
Original file line number Diff line number Diff line change
@@ -789,7 +789,7 @@ pro rm_spflux_v5, objname, adderr=adderr, combinedir=combinedir, $
spframe_read, objname[0], plugmap=plugmap, hdr=hdr
objtype = strtrim(plugmap.objtype,2)
iphoto = where((objtype EQ 'SPECTROPHOTO_STD' OR objtype EQ 'REDDEN_STD') $
AND plugmap.offsetid EQ 1, nphoto)
AND plugmap.offsetid EQ 1 AND plugmap.badstdmask EQ 0, nphoto)

;----------
; Check if it is a MWM plate
@@ -805,10 +805,7 @@ pro rm_spflux_v5, objname, adderr=adderr, combinedir=combinedir, $

;----------

if keyword_set(MWMPlate) then begin
iphoto = where((objtype EQ 'SPECTROPHOTO_STD' OR objtype EQ 'REDDEN_STD') $
AND plugmap.offsetid EQ 1 AND plugmap.mag[3] lt 18.0, nphoto)
endif


if (nphoto EQ 0) then begin
splog, 'WARNING: No SPECTROPHOTO or REDDEN stars for flux calibration'
7 changes: 7 additions & 0 deletions pro/spec2d/readplugmap.pro
Original file line number Diff line number Diff line change
@@ -97,6 +97,12 @@ function readplugmap_sort, plugmap, hdr, fibermask=fibermask, plates=plates
plugsort.holetype = 'OBJECT'
plugsort.objtype = 'NA'
plugsort.fiberid = -1

plugsort = struct_addtags(plugsort, $
replicate(create_struct('BADSTDMASK', 0L), n_elements(plugsort)))
plugmap = struct_addtags(plugmap, $
replicate(create_struct('BADSTDMASK', 0L), n_elements(plugmap)))

if keyword_set(plates) then begin
programname = (yanny_par(hdr, 'programname'))[0]
program_tag1 = replicate( $
@@ -120,6 +126,7 @@ function readplugmap_sort, plugmap, hdr, fibermask=fibermask, plates=plates
if plugmap[i].mag[3] ge 18.0 then begin
;plugmap[i].fiberid=-1
badstdmask[i] = 1
plugmap[i].badstdmask = 1
endif
endif
endfor

0 comments on commit 3aca381

Please sign in to comment.