PRO vsg_info ; ; Create and output information on the vacuum storage gratings... ; 5/12/98 dd ; ; Assumes that gs_load_all has been run to get current GratingStatus ; sheet loaded... ; @gs_common @lrps_common ; - - - - - - Where to put output products - - - - - - - - ; The various .html, .txt, .ps, .gif, etc. files created are ; transferred to this directory... out_dir = '/nfs/spectra/d6/temp_to_web' ; - - - - - - List of all Vacuum Storage Gratings - - - - - - - ; ; Create output file for information on the Vacuum Storage Gratings openw, vsg_unit, 'vsg_summary.html', /GET_LUN ; List the Vacuum Storage grating summary information printf, vsg_unit, '
' gs_list, where(STRPOS(gs_data.NoFly,'uum') GE 0), WRITE_TO_FILE = vsg_unit print, '' printf, vsg_unit, '' close, vsg_unit free_lun, vsg_unit ; save and delete the products spawn, 'cp vsg_summary.html '+out_dir spawn, 'rm vsg_summary.html ' ; - - - - - - Selecting VSGs for Period Trend Monitoring - - - - - - - ; ; Look at the vsg's as if they were a set of flight gratings - ; how were their period properties at the 9611xx time frame? ; Note that "active area" analysis is used in this case. if 0 EQ 1 then begin ; - - - - ; Selecting all gratings at 9611xx: period_specification, 'vsg_all_HEGs_9611',/ACTIVE,/HARDCOPY ; Remove HD2334 and HA2045 as too extreme a period to ; be representative ; Remove H2102 as not from a flight lot (and so not included ; in flight-like ensemble trend calculations). period_specification, 'vsg_all_MEGs_9611',/ACTIVE,/HARDCOPY ; Remove MC1212 and ME1408 as completely unflightworthy ; nor flight representative. ; and save and remove the products... spawn, 'cp vsg_all_MEGs_9611.active.txt '+out_dir spawn, 'cp vsg_all_HEGs_9611.active.txt '+out_dir spawn, 'cp vsg_all_MEGs_9611.active.ps '+out_dir spawn, 'cp vsg_all_HEGs_9611.active.ps '+out_dir spawn, 'ps2gif vsg_all_MEGs_9611.active.ps ' spawn, 'ps2gif vsg_all_HEGs_9611.active.ps ' spawn, 'cp vsg_all_MEGs_9611.active.gif '+out_dir spawn, 'cp vsg_all_HEGs_9611.active.gif '+out_dir ; spawn, 'rm vsg_all_*EGs_9611.active.*' ; - - - end ; - - - - - - Plots of the VSG Sets at Retest Times - - - - - - - ; Analyze the acceptable & representative set of gratings at the various ; vac storage retest times (9611, 9707, and 9801) and ; present the results. grats = ['MEG','HEG'] retest_times = ['9611','9707','9801'] n_retests = n_elements(retest_times) ; Make files to print and plot: if 0 EQ 1 then begin USE_DPP_CHANGE = 0 ; - - - ; Do the analysis... for ig = 0,1 do begin grat = grats(ig) for ir = 0, n_retests-1 do begin period_specification, 'vsg_'+grat+'s_'+retest_times(ir),/ACTIVE,/HARDCOPY if ir EQ 0 then begin p_array_out = FLTARR(n_retests) dpp_array_out = FLTARR(n_retests) end p_array_out(ir) = lrps_THE_ave_per dpp_array_out(ir) = lrps_overall_dpp end print, '' ; Summarize the data print, ' Vacuum Storage LR Results: '+grat+' Ensemble' print, '' time_headers = ' '+retest_times + 'xx ' time_header = '' for ih=0,n_elements(time_headers)-1 do time_header = time_header + $ time_headers(ih) print, ' Test Date : ' + time_header p_out_string = ' P_ave : ' dpp_out_string = ' dp/p : ' for ir=0,n_elements(p_array_out)-1 do begin if USE_DPP_CHANGE EQ 1 AND ir NE 0 then begin ppm = 1.E6*(p_array_out(ir)/p_array_out(0) - DOUBLE(1.0)) sign_char = '' if ppm GE 0.0 then sign_char = '+' ppm_str = '['+sign_char+STRING(FIX(ppm),FORMAT='(I4)')+'ppm]' p_out_string = p_out_string + STRPAD(ppm_str,11,/RI,/COM) end else begin p_out_string = p_out_string + STRING(p_array_out(ir),FORMAT='(F11.2)') end if USE_DPP_CHANGE EQ 1 AND ir NE 0 then begin percent = 1.E2*(dpp_array_out(ir)/dpp_array_out(0) - DOUBLE(1.0)) sign_char = '' if percent GE 0.0 then sign_char = '+' dpp_str = '['+sign_char+STRING(FIX(percent),FORMAT='(I4)')+'%]' dpp_out_string = dpp_out_string + STRPAD(dpp_str,11,/RI,/COM) end else begin dpp_out_string = dpp_out_string + $ STRING(dpp_array_out(ir),FORMAT='(F11.2)') end end print, ' ' + p_out_string print, ' ' + dpp_out_string print, '' end print, '' filename = 'vsg_ensemble_results.txt' if USE_DPP_CHANGE EQ 1 then filename = 'vsg_ensemble_changes.txt' print, ' Save output: IDL> $cat > ' + filename print, ' ...' print, ' and re-run.' ; and save and remove the products... for ig = 0,1 do begin grat = grats(ig) for ir = 0, n_retests-1 do begin spawn, 'cp vsg_'+grat+'s_'+retest_times(ir)+'.active.txt '+out_dir spawn, 'cp vsg_'+grat+'s_'+retest_times(ir)+'.active.ps '+out_dir spawn, 'ps2gif vsg_'+grat+'s_'+retest_times(ir)+'.active.ps ' spawn, 'cp vsg_'+grat+'s_'+retest_times(ir)+'.active.gif '+out_dir end end spawn, 'cp vsg_ensemble_results.txt '+out_dir spawn, 'cp vsg_ensemble_changes.txt '+out_dir ; spawn, 'rm vsg_*EGs_9*.active.*' ; - - - end ;- - - - - - Analyze and Present Period Trend Data for the Facets - - - - - - - ; ; The period_specification procedure leaves its results ; in common: ; COMMON spec_data, lrps_periods, lrps_xaxis, lrps_file_names, lrps_entries, $ ; lrps_list_file, $ ; lrps_aveps, lrps_dpp, lrps_nbadpts, lrps_totpts, $ ; lrps_THE_ave_per, lrps_overall_dpp, $ ; lrps_use_active if 0 EQ 1 then begin ; - - - ; Other facet sets... ;;FACET_SET = '' ; Ensemble set FACET_SET = 'all_' ; all facets ;;FACET_SET = 'nf_' ; "no-fly" (non-ensemble) facets ; USE_DPP_CHANGE = 1 ; for ig = 0,1 do begin grat = grats(ig) for ir = 0, n_retests-1 do begin period_specification, 'vsg_'+ $ FACET_SET+grat+'s_'+retest_times(ir), /ACTIVE ; First time through? ; Create an array for the results... if ir EQ 0 then begin p_array_out = FLTARR(n_elements(lrps_aveps),n_retests) dpp_array_out = FLTARR(n_elements(lrps_dpp),n_retests) end p_array_out(*,ir) = lrps_aveps dpp_array_out(*,ir) = lrps_dpp end print, '' print, grat+':' print, p_array_out print, dpp_array_out ; save the results: if ig EQ 0 then begin meg_entries = lrps_entries meg_p_array = p_array_out meg_dpp_array = dpp_array_out end else begin heg_entries = lrps_entries heg_p_array = p_array_out heg_dpp_array = dpp_array_out end end all_entries = [meg_entries, heg_entries] all_p_array = [meg_p_array, heg_p_array] all_dpp_array = [meg_dpp_array, heg_dpp_array] print, '' ; Summarize the data if FACET_SET EQ '' then print, ' Vacuum Storage LR Results: Ensemble Facet Trends' if FACET_SET EQ 'all_' then print, ' Vacuum Storage LR Results: ALL Facet Trends' if FACET_SET EQ 'nf_' then print, ' Vacuum Storage LR Results: "No Fly" Facet Trends' print, '' time_headers = ' '+retest_times + 'xx ' time_header = '' for ih=0,n_elements(time_headers)-1 do time_header = time_header + $ time_headers(ih) print, ' Test Date : ' + time_header print, 'Grating' all_lines = gs_line_of_entry(all_entries) for ie=0,n_elements(all_entries)-1 do begin p_out_string = ' P_ave : ' dpp_out_string = ' dp/p : ' for ir=0,n_elements(all_p_array(0,*))-1 do begin if USE_DPP_CHANGE EQ 1 AND ir NE 0 then begin ppm = 1.E6*(all_p_array(ie,ir)/all_p_array(ie,0) - DOUBLE(1.0)) sign_char = '' if ppm GE 0.0 then sign_char = '+' ppm_str = '['+sign_char+STRING(FIX(ppm),FORMAT='(I4)')+'ppm]' p_out_string = p_out_string + STRPAD(ppm_str,11,/RI,/COM) end else begin p_out_string = p_out_string + STRING(all_p_array(ie,ir),FORMAT='(F11.2)') end if USE_DPP_CHANGE EQ 1 AND ir NE 0 then begin percent = 1.E2*(all_dpp_array(ie,ir)/all_dpp_array(ie,0) - DOUBLE(1.0)) sign_char = '' if percent GE 0.0 then sign_char = '+' dpp_str = '['+sign_char+STRING(FIX(percent),FORMAT='(I4)')+'%]' dpp_out_string = dpp_out_string + STRPAD(dpp_str,11,/RI,/COM) end else begin dpp_out_string = dpp_out_string + $ STRING(all_dpp_array(ie,ir),FORMAT='(F11.2)') end end print, ' '+strpad(gs_data(all_lines(ie)).frame,6) + p_out_string print, ' ', dpp_out_string print, '' end print, '' filename = 'vsg_facet_results.txt' if USE_DPP_CHANGE EQ 1 then filename = 'vsg_facet_changes.txt' print, ' Save output: IDL> $cat > ' + filename print, ' ...' print, ' and re-run.' ; cat the output to one of the files: ; vsg_facet_results.txt ; vsg_facet_changes.txt ; and save (don't remove) these products... spawn, 'cp vsg_facet_results.txt '+out_dir spawn, 'cp vsg_facet_changes.txt '+out_dir ; - - - end ; - - - - - - Getting printouts for LR specific tests - - - - - - ; To print out the sheets of paper that summarize ; LR tests do: ; ; IDL> dump_file = 'HA1234.980119123456' ; IDL> @lr_doc_dump ; ; - - - - - - - Reference grating stability - - - - - - - ; for the vsg measurements... if 0 EQ 1 then begin ; - - - ; List the ref values for the relevant measurements... FACET_SET='all_' for ig = 0,1 do begin grat = grats(ig) for ir = 0, n_retests-1 do begin lr_ref_stab, 'vsg_'+ $ FACET_SET+grat+'s_'+retest_times(ir) end end ; - - - end if 0 EQ 1 then begin ; - - - ; Better: ; plot the history of the ref values for the 9611+ ; time frame... lr_ref_history, SINCE='961100' ; This creates output plots and test listing: ; lr_ref_history.ps, and '.txt spawn, 'cp lr_ref_history.txt '+out_dir spawn, 'cp lr_ref_history.ps '+out_dir spawn, 'ps2gif lr_ref_history.ps ' spawn, 'cp lr_ref_history*.gif '+out_dir ; spawn, 'rm lr_ref_history*.gif' spawn, 'rm lr_ref_history.txt' spawn, 'rm lr_ref_history.ps' ; - - - end ; In anycase get rid of idl.ps... spawn, 'rm idl.ps' RETURN END