-
Notifications
You must be signed in to change notification settings - Fork 1
/
process_gpi_spectral_template.script
39 lines (30 loc) · 1.62 KB
/
process_gpi_spectral_template.script
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
;; Example script to process GPI spectral data through pipeline.
;; Will produce oifits files.
save_dir='~/data/gpi_data/gpi_May14/Analysis/hd142527_J/'
data_dir='~/data/gpi_data/gpi_Mar14/Cubed_imaging/'
prefix='S20140324S' ;; Start of the filenames
frames=365+findgen(5) ;;the numbers at the end of your data
tsize=[0.01+fltarr(5)] ;; files with the same number will be processed together, negative numbers note targets
;; Things that you shouldnt need to touch
jobname='' ;;just a name thats added to the files
extn='_spdc.fits'
;; discard_sigma defines criteria for automatic frame rejection.
;; The 5 entries are the number of sigma to reject based on:
;; [x position, y position, total flux, peak flux]
;; if there is a 5th entry, it repeats the peak flux calculation using
;; only discard_sigma[4] percent of frames to get the mean and st.dev.
;; Negative numbers mean no rejection!
discard_sigma=[-2., -2., 5., -3.6, -0.7]
;;neither of these are needed in qbe_gpi (since they are done in the GPI pipeline)
flatpath=''
skies=0
cd,save_dir
;;cube the data
qbe_gpi,data_dir, jobname, flatpath, frames,skies, tsize,extn=extn,prefix=prefix,cutsize=256,discard_sigma=discard_sigma
;;get the visibilities and closure phases
calc_bispect_gpi, save_dir+"cubeinfo"+jobname+".idlvar" , root_dir="~/code/masking/"
;;calibrate the data
calibrate_v2_cp_gpi,save_dir+"cubeinfo"+jobname+".idlvar",/save_python,root_dir='~/code/masking/',/skip_cp_rejection,/no_cp_rejection
;; Fit a binary model to the data and calculate detection limits
binary_grid,'HD142527_0000_mrg.oifits' ;; you will have to change the filename here to your output oifits
end