Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving sim scripts #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 82 additions & 14 deletions eppsilon_IDL_wrappers/slurm_ps_job.pro
Original file line number Diff line number Diff line change
@@ -1,24 +1,92 @@
pro slurm_ps_job
;; wrapper for ps_wrapper to take in shell parameters

PROFILER, /RESET
RESOLVE_ROUTINE, 'ps_wrapper', /QUIET
RESOLVE_ALL, /CONTINUE_ON_ERROR, /QUIET

compile_opt strictarr
args = Command_Line_Args(count=nargs)
folder_name=args[0]
obs_range=args[1]
if (nargs eq 3) then n_obs=args[2]
;if (nargs eq 3) then n_obs=args[2]
print,'folder_name = '+folder_name
print,'obs_range = '+obs_range
image_window_name = 'Blackman-Harris'
if (nargs eq 3) then begin
n_obs=args[2]
ps_wrapper,folder_name,obs_range,n_obs=n_obs,kperp_range_lambda_1dave=[5,50],/plot_kpar_power,/plot_kperp_power,/png,/plot_k0_power,/exact_obsnames,loc_name='oscar'
endif else begin
ps_wrapper,folder_name,obs_range,kperp_range_lambda_1dave=[5,50],/plot_kpar_power,/plot_kperp_power,/png,/plot_k0_power,/exact_obsnames,loc_name='oscar'
endelse

PROFILER,filename='/users/wl42/scratch/FHD_out/IDL_ps_profile.out', /REPORT

;;;;;; FT Parameters
; freq_ch_range=[ 125, 250 ] ; 10MHz for the correct MWA channelization (z = 6.56 to 7.00)
;; freq_ch_range deactivated for HERA 10MHz simulation
; freq_ch_range=[ 0, 129 ] ; 10MHz for the correct MWA channelization ( z = 7.019 to 7.5)
; freq_ch_range=[ 0, 65 ] ; 5MHz for the correct MWA channelization ( z = 7.019 to 7.5)
; freq_ch_range=[ 130, 259 ]
; freq_ch_range=[ 260, 383 ]
no_spec_window=1
; kperp_range_1dave = [] ; Set to limit kperp range for binning
std_power = 0 ; Use FT instead of Lomb-Scargle
refresh_beam=0

; Colorbar options

; color_type='linear'

;;;;; BinninMWAGoldenZenith; kperp_range_lambda_1dave=[0.0,25.0]
; kpar_range_kperppower=[0.3,0.4]

;; File bloat reduction test:

; no_binning=1
save_slices=1

;;;;;; Which plots?:
plot_stdset=1
plot_slices=0
; slice_type='raw'
; uvf_plot_type='abs' ; These two only used if plot_slices=1
plot_2d_masked=0
plot_1to2d=1 ; Show where the 2d bins are on the 2d plot
plot_kpar_power=0
plot_kperp_power=0
plot_k0_power = 0 ; Causes issues when running with other 1d plots
plot_noise_1d = 0
plot_sim_noise = 0
plot_binning_hist= 0 ;for debugging

;;;;;; 2D plotting options
plot_wedge_line=1
kperp_linear_axis=0
kpar_linear_axis=0
; kperp_plot_range=[5,10]
; kperp_lambda_plot_range=
; kpar_plot_range=
baseline_axis=1
delay_axis=1
cable_length_axis=0
; ref_eor_file="/users/alanman/data/alanman/BubbleCube/TiledHpxCubes/pspecs_21cmFAST/ps_no_halos_z008.24_nf0.550294_useTs1_zetaX2.0e+56_alphaX1.2_TvirminX3.0e+04_aveTb009.92_Pop2_256_300Mpc_v3"

;;;;;; 1D plotting options
set_krange_1dave=0
; range_1d=
plot_1d_delta=0
plot_1d_error_bars=0
plot_1d_nsigma=2
; plot_eor_1d=1
plot_flat_1d=0
no_text_1d=0
sim=1
png=1
; data_range=[1,3]


use_weight_cutoff_sim=1
hinv=0

extra = var_bundle()


ps_wrapper,folder_name,obs_range,/exact_obsnames,loc_name='oscar', _Extra=extra


; if (nargs eq 3) then begin
; n_obs=args[2]
; ps_wrapper,folder_name,obs_range,n_obs=n_obs,/plot_kpar_power,/plot_kperp_power,/png,/plot_k0_power,/plot_eor_1d,/exact_obsnames,loc_name='oscar'
; endif else begin
; ps_wrapper,folder_name,obs_range,/plot_kpar_power,/plot_kperp_power,/png,/plot_k0_power,/plot_eor_1d,/exact_obsnames,loc_name='oscar'
; endelse

end
79 changes: 79 additions & 0 deletions eppsilon_IDL_wrappers/slurm_reduced_ps_job.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
pro slurm_reduced_ps_job
;; wrapper for ps_wrapper. Meant for separated mode.

compile_opt strictarr
args = Command_Line_Args(count=nargs)
folder_name=args[0]
obs_range=args[1]
;if (nargs eq 3) then n_obs=args[2]
print,'folder_name = '+folder_name
print,'obs_range = '+obs_range

;;;;;; FT Parameters
; freq_ch_range=[ 0, 129 ] ; 10MHz for the correct MWA channelization ( z = 7.019 to 7.5)
; freq_ch_range=[ 130, 259 ]
; freq_ch_range=[ 260, 383 ]
no_spec_window=1

; kperp_range_1dave = [] ; Set to limit kperp range for binning
std_power = 0 ; Use FT instead of Lomb-Scargle
refresh_beam=0
refresh_dft=0

; Colorbar options
color_type='linear'

;;;;; BinninMWAGoldenZenith; kperp_range_lambda_1dave=[0.0,25.0]
; kpar_range_kperppower=[0.3,0.4]

; Which cubes?
pol_inc=['xx']
; type_inc=['RES']

;;;;;; Which plots?:
plot_stdset=0
plot_slices=0
; slice_type='raw'
; uvf_plot_type='abs' ; These two only used if plot_slices=1
plot_2d_masked=0
plot_1to2d=0 ; Show where the 2d bins are on the 2d plot
plot_kpar_power=0
plot_kperp_power=0
plot_k0_power = 0 ; Causes issues when running with other 1d plots
plot_noise_1d = 0
plot_sim_noise = 0
plot_binning_hist= 0 ;for debugging

;;;;;; 2D plotting options
plot_wedge_line=1
wedge_angles=[90.0]

kperp_linear_axis=0
kpar_linear_axis=0
; kperp_plot_range=[5,10]
; kperp_lambda_plot_range=
; kpar_plot_range=
baseline_axis=1
delay_axis=1
cable_length_axis=0

;;;;;; 1D plotting options
set_krange_1dave=0
; range_1d=
plot_1d_delta=0 ; Physical or theoretician units?
plot_1d_error_bars=1
; plot_1d_nsigma=2
; plot_eor_1d=1
plot_flat_1d=0
no_text_1d=0
sim=1
png=1
; data_range=[1,3]

hinv=0

extra = var_bundle()

ps_wrapper,folder_name,obs_range,/exact_obsnames,loc_name='oscar', _Extra=extra

end
2 changes: 1 addition & 1 deletion simulation/locate_uvfits_oscar.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main():

(options,args) = parser.parse_args()

cmd = 'find /gpfs/data/jpober/alanman -name \"'+options.obsid+ '\".uvfits ! -path \"/gpfs/data/jpober/alanman/OLD/*\"'
cmd = 'find /gpfs/data/jpober/alanman /gpfs/data/jpober/shared/Phase2OneDaySet -name \"'+options.obsid+ '\".uvfits ! -path \"/gpfs/data/jpober/alanman/OLD/*\"'
cmd = cmd + " ! -path \"/gpfs/data/jpober/alanman/FHD_out/*\""
out = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdout, stderr) = out.communicate()
Expand Down
1 change: 1 addition & 0 deletions simulation/obsid_list_files/EWBase_14m_plat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ewbase_14m_plat
101 changes: 101 additions & 0 deletions simulation/obsid_list_files/EoR1_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
1066679032
1066678904
1066678784
1066678664
1066678544
1066678416
1066678296
1066678176
1066678056
1066677928
1066677808
1066677688
1066677568
1066677440
1066677320
1066677200
1066677080
1066676952
1066676832
1066676712
1066676592
1066676464
1066676344
1066676224
1066676104
1066675976
1066675856
1066675736
1066675616
1066675488
1066675368
1066675248
1066675128
1066675000
1066674880
1066674760
1066674640
1066674512
1066674392
1066674272
1066674152
1066674024
1066673904
1066673784
1066673664
1066673536
1066673416
1066673296
1066673176
1066673048
1066672928
1066672808
1066672688
1066672560
1066672440
1066672320
1066672200
1066672072
1066671952
1066671832
1066671712
1066671584
1066671464
1066671344
1066671224
1066671096
1066670976
1066670856
1066670736
1066670608
1066670488
1066670368
1066670248
1066670120
1066670000
1066669880
1066669760
1066669632
1066669512
1066669392
1066669272
1066669144
1066669024
1066668904
1066668784
1066668656
1066668536
1066668416
1066668296
1066668168
1066668048
1066667928
1066667808
1066667680
1066667560
1066667440
1066667320
1066667192
1066667072
1066666952
1066666832
19 changes: 19 additions & 0 deletions simulation/obsid_list_files/EoR1_selected
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1066675616
1066676104
1066676224
1066675856
1066673664
1066675368
1066675736
1066671224
1066674880
1066670736
1066675488
1066674272
1066675248
1066675000
1066674640
1066674024
1066674760
1066674392
1066674512
1 change: 1 addition & 0 deletions simulation/obsid_list_files/EoR1_selected_fake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
s1066675616_0
Loading