read_muse_phangs_voronoi_bins.pro
1.39 KB
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
45
46
47
48
49
50
51
52
53
FUNCTION read_muse_phangs_voronoi_bins,object,header_in=header_in,header_out=header_out,snr_bin=snr_bin,flux=flux,snr_flux=snr_flux
;stop
;==== maps of MUSE parameters
dir='/Volumes/PILOT_FLIGHT1/PHANGS_MUSE/DR2p2/coopt/MUSEDAP/fiducial/'
file=dir+object+'-0.92asec_MAPS-001.fits'
toto=mrdfits(file,0,h) ;This is ?
print,sxpar(h,'EXTNAME')
;stop
;toto=mrdfits(file,1,h) ;This looks like a map pixel ID
;print,sxpar(h,'EXTNAME')
;ID
flux=mrdfits(file,2,h) ;This looks like a map of fluxes (usable in Dustem ?)
print,sxpar(h,'EXTNAME')
;FLUX
snr_flux=mrdfits(file,3,h) ;This looks like a map of SNR (of flux ?)
;print,sxpar(h,'EXTNAME')
;SNR
snr_bin=mrdfits(file,4,h) ;This is the SNR
print,sxpar(h,'EXTNAME')
;SNRBIN
bin_id=mrdfits(file,5,h) ;This is the bin ID
print,sxpar(h,'EXTNAME')
;BIN_ID
;toto=mrdfits(file,6,h) ;This is the bin ID
;print,sxpar(h,'EXTNAME')
;V_STARS
;toto=mrdfits(file,7,h) ;This is the bin ID
;print,sxpar(h,'EXTNAME')
;FORM_ERR_V_STARS
;etc ...
;stop
hh=cd2astro_header(h)
;image_cont20,snrbin,h,/square,image_color='jpbloadct',imrange=[50,200],/silent,off_bar=obp
ind=where(finite(bin_id) NE 1,count)
bin_id[ind]=la_undef()
print,sxpar(h,'EXTNAME')
h=cd2astro_header(h)
sxaddpar,h,'EQUINOX',2000.
IF keyword_set(header_in) THEN BEGIN
voronoi_id=project2(h,bin_id,header_in,/silent,/round)
header_out=header_in
ENDIF ELSE BEGIN
voronoi_id=bin_id
header_out=h
ENDELSE
RETURN,voronoi_id
END