Blame view

LabTools/IRAP/JPB/read_muse_phangs_weights.pro 1.9 KB
d6343d56   Jean-Philippe Bernard   First commit
1
2
3
4
FUNCTION read_muse_phangs_weights,object=object,young=young,bin_numbers=bin_numbers

use_object='NGC0628'
IF keyword_set(object) THEN use_object=object
96cbcd8f   Jean-Philippe Bernard   improved
5
;dir='/Volumes/PILOT_FLIGHT1/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/fiducial'
9c5f0ed1   Jean-Philippe Bernard   improved
6
;dir=!phangs_data_dir+'/phangs_drive/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/fiducial'
d451cb3c   Jean-Philippe Bernard   improved
7
8
9
;dir=!phangs_data_dir+'/phangs_drive/Archive/PHANGS_MUSE/DR2.2/copt/MUSEDAP/fiducial'
dir=!phangs_data_dir+'/phangs_drive/Archive/PHANGS_MUSE/DR2.2/copt/MUSEDAP/fiducial/intermediate/DR2.2v1_copt_SFHs/'

d6343d56   Jean-Philippe Bernard   First commit
10
11

IF keyword_set(young) THEN BEGIN
96cbcd8f   Jean-Philippe Bernard   improved
12
	;dir='/Volumes/PILOT_FLIGHT1/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/young'
9c5f0ed1   Jean-Philippe Bernard   improved
13
	dir=!phangs_data_dir+'/phangs_drive/Archive/PHANGS_MUSE/DR2.2/copt/MUSEDAP/young'
d6343d56   Jean-Philippe Bernard   First commit
14
15
16
ENDIF

file=dir+'/'+use_object+'-0.92asec_ppxf_SFH.fits'
9c5f0ed1   Jean-Philippe Bernard   improved
17
18
19
20
21
st_info=file_info(file)
IF st_info.exists NE 1 THEN BEGIN
	message,'Could not find '+file,/continue
	stop
ENDIF
d6343d56   Jean-Philippe Bernard   First commit
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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

0ed148cc   Jean-Philippe Bernard   improved
47
;return the Muse bins numbers [0,77]
d6343d56   Jean-Philippe Bernard   First commit
48
49
50
51
52
bin_numbers=muse_phangs_weightst2bin_numbers(st,Nbin=Nbin)

RETURN,st

END