function create_vis,vis_plot_fit ; script to produce a hardwired vis selection ; if argument vis_plot_fit=1 the fits to the stack profiles will be shown nroll= [30, 30, 30, 30, 28, 20, 12, 10, 6] time_range = ['2002/04/10 '+['12:30:20.000', '12:33:20.000']] det_index_mask = [0,0,1, 1,1,1, 1,1,1] use_flux_var = 0 vis_plot_fit = 1 energy_band=[20.,30.] xyoffset1 = [ -22.4738, 436.956] phz_radius = 0 message,'COMPUTING VISIBILITIES ',/info o = hsi_image() o->set, vis_time_int = time_range, det_index_mask = det_index_mask, energy_band = energy_band o->set, xyoffset = xyoffset1, phz_radius=phz_radius, use_flux_var=use_flux_var o->set, phz_n_roll_bins_control = LONARR(9) + nroll o->set, cbe_digital_quality = 0.95 o->set, phz_report_roll_bins = 1 o->set, vis_plotfit=vis_plot_fit ;Added the following that were set in script produced by gui: o-> set, uniform_weighting= 0 o-> set, use_auto_time_bin= 1L o-> set, use_cull= 0 ;1 o-> set, use_flare_xyoffset= 0 ; use our own xyoffset, not the flare catalog one o-> set, use_local_average= 0B o-> set, use_rate= 1 o-> set, use_phz_stacker= 1L o-> set, phz_n_phase_bins= 12L o-> set, phz_n_roll_bins_min= [12L, 12L, 12L, 12L, 12L, 12L, 12L, 6L, 4L] o-> set, phz_n_roll_bins_max= [64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L] vis_oo = o->getdata(class='hsi_visibility') params=o->get(/all) help,params,/st print,'vis_oo.isc=',vis_oo.isc return,vis_oo end ; SCRIPT TO BE EXECUTED BY .RUN create_vis_singleton1 det_index_mask=replicate(1,9) ; all 9 grid pairs ; det_index_mask=[0,0,1,1,1,1,1,1,1] ; only 7 grid pairs for e=0,2 do begin energy_band = [12.,15.] if e eq 1 then energy_band = [15.,20.] if e eq 2 then energy_band = [20.,30.] ; nn=[0,15,16, 19,18,14, 9,7,5, 16,27] ; nn=[8,31,19] ; ; date=[21025,20929,50516] ; nn=[ 00, 05, 06, 07, 09, 15, 16, 18, 19, 08, 27] ; compact srcs ; date=[20410,20816,20929,21003,21202,40713,40417,50116, 50516,21025,20910] ; nn=[27,07,00] ; date=[20910,21003,20410] ; nn=[08] & date=[21025] ; nn=[09] ; date=[21003] ; nn=[07] date=[20410] ; nn=[00] ; date=[40713] & nn=[15] ; date=[21202] ; nn=[09] ; date=[40717] & nn=[16] ; date=[20816] & nn=[05] ; nn=[25] & date=[20317] ; nn=[07] & date=[21003] ; nn=[29] & date=[31222] ; nn=[21,29] & date=[50912,31222] ; nn = [21] & date=[50912] ; nn=[13,17,23] & date=[31219,41022,50916] ; nn=[12] & date=[31119] ; nn=[12,13,17,23] & date=[31119,31219,41022,50916] ; nn=[11] & date=[31118] ; nn = [02] & date=[20601] ; nn=[08] & date=[21025] ;nn=[05,06,09,11,18,19] ;date=[20816,20929,21202,31118,50116,50516] ;nroll=[48,48,48,42,36,30,24,18,12] & nrollx= 'nrolla' ; 4.8% outliers for flare 30 ;nroll=[64,64,60, 52,44,36, 28,20,12] & nrollx= 'nrollb' ; 6.5% outliers for flare 30 ;nroll=[48,48,40,36,32,28,20,16,12] & nrollx= 'nrollc' ; 5.5% outliers for flare 30 ;nroll=0 & nrollx='nroll0' ;nroll=[44,40,36,32,28,24,20,8,6,4] & nrollx='nrolld'; after trials with gui -> gives chisq=2.18 in vff, 1 circle ;nroll=[30,30,30,30,30,28,20,16,12] & nrollx='nrolle' ; date = [21004] & nn = [22] ; nroll=[30,30,30,30,28,20,8,6,4] & nrollx='nrollg' ; nn=[02] & date=[20601] nn=[00] & date=[20410] nroll= [30, 30, 30, 30, 28, 20, 12, 10, 6] & nrollx='nrollf' nel=n_elements(nn) fname=' ' ; fname is created by create_vis_singleton1 params=1 ratio_bad=1.0 ; the limit above which vis are deemed not to have good quality for j=0,nel-1 do begin print,'Creating vis for nn[j]=',nn[j],' date=',date[j] vis=create_vis_singleton1(nn[j],ENERGY_BAND=energy_band,FNAME=fname,PARAMS=params,nroll=nroll,$ DET_INDEX_MASK=det_index_mask) n_outliers=-1 ; qual_measure(vis,nzero,mea_sig2amp,std_sig2amp,w_firsthzero) ; , ratio_bad=ratio_bad) print,'Saving '+ nrollx+fname save,vis,nroll,n_outliers,nzero,mea_sig2amp,std_sig2amp,w_firsthzero,ratio_bad,$ file=nrollx+'D3-9'+fname,/ver print,'Check for new visfit plot file.' stop endfor endfor ; e end