% Sept. 22, 2003 % % Load the main package and example subroutines. In ISIS, the first % line could, and probably should, be replaced by: require("sitar"); () = evalfile("sitar.sl"); () = evalfile("fold_the_asm_examp.sl"); variable ev, rb, pf, ef; variable fp, name, n, file; % Open the file with root names of the ASM files. NOTE: This list % can change on the ASM web page, so it's safest to generate your own fp = fopen("asm_files","r"); % Keep reading lines of the source name file, until it's empty while(-1 != fgets(&file,fp)) { % Strip off extraneous carriage returns from the read file = strtrim(file); % Strip off the front and end of the file name to get the source name (name,n) = strreplace(file,"xa_","",1); (name,n) = strreplace(name,"_d1","",-1); % Read the data, then rebin it to 7 days binning ev = sitar_readasm(file,,,1.3,,1); rb = sitar_rebin_rate(ev.time,ev.rate,,7.,,,7,1); asm_plot_range(,,,); asm_xyhplot("Time (MJD)","ASM Rate (cps)",name,"_rate", rb.bin_lo,rb.bin_hi,rb.rate,,0,0,1,0); % Epoch fold with 500 logarithmic periods from 5 minutes to 500 days. % Plot on logarithmic and linear x-axes ef = sitar_epfold_rate(ev.time,ev.rate,0.0037,500.,20,-500.); asm_plot_range(,,,); asm_xyplot("Trial Period","L Statistic",name,"_eflg", ef.prd,ef.lstat,1,1,0); asm_plot_range(,,,); asm_xyplot("Trial Period","L Statistic",name,"_efln", ef.prd,ef.lstat,0,1,0); } () = fclose(fp);