read_muse_phangs_weights.pro 1.43 KB
FUNCTION read_muse_phangs_weights,object=object,young=young,bin_numbers=bin_numbers

use_object='NGC0628'
IF keyword_set(object) THEN use_object=object
dir='/Volumes/PILOT_FLIGHT1/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/fiducial'

IF keyword_set(young) THEN BEGIN
	dir='/Volumes/PILOT_FLIGHT1/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/young'
ENDIF

file=dir+'/'+use_object+'-0.92asec_ppxf_SFH.fits'
toto=mrdfits(file,0,h) ;This is ?
st=mrdfits(file,1,h) ;This is ?
;help,st,/str
;** Structure <a01c3608>, 141 tags, length=1128, data length=1124, refs=1:
;   BIN_ID          LONG                 0
;   V_STARS         DOUBLE          -682.98026
;   SIGMA_STARS     DOUBLE           18.853184
;   REDDENING       DOUBLE          0.34150076
;   CHI2_SSP        DOUBLE           18.571838
;   W_0             DOUBLE           0.0000000
;   W_1             DOUBLE           0.0000000
;   W_2             DOUBLE           0.0000000
;   W_3             DOUBLE           0.0000000
; ....
;   W_67            DOUBLE           0.0000000
;   EW_0            DOUBLE           0.0000000
;   EW_1            DOUBLE           0.0000000
;   EW_2            DOUBLE           0.0000000
;   EW_3            DOUBLE           0.0000000
;....
;   EW_66           DOUBLE           0.0000000
;   EW_67           DOUBLE           0.0000000
;print,minmax(st.bin_id)
;                  0       47068

;return the Muse bins numbers [0,77]
bin_numbers=muse_phangs_weightst2bin_numbers(st,Nbin=Nbin)

RETURN,st

END