
#!/bin/sh
if [ ! "$SAS_ODFDIR" ]; then
echo ""
echo "Please set the SAS_ODFDIR environment variable to point at the directory"
echo "containing the ODF files for this observation."
echo ""
exit 1
fi
# # [INFO] [2024-11-30T23:53:03] Module name: VerifyODF
# # [INFO] [2024-11-30T23:53:03] Instrument: all
# # [INFO] [2024-11-30T23:53:03] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:03] Module version number: 1.18
# # [INFO] [2024-11-30T23:53:03] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:53:03] Module name: MakeCIF
# # [INFO] [2024-11-30T23:53:03] Instrument: all
# # [INFO] [2024-11-30T23:53:03] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:03] Module version number: 1.23
# # [INFO] [2024-11-30T23:53:03] Observation start defined as >2005-10-22T15:55:28.000<
# # [INFO] [2024-11-30T23:53:03] Processing date defined as >2024-12-01T00:53:03<
# [COMMAND] [2024-11-30T23:53:03]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:03]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:03] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:03]
cifbuild analysisdate=2024-12-01T00:53:03 calindexset=product/P0303820601OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-10-22T15:55:28.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:34]
# # [INFO] [2024-11-30T23:53:34] Task Run Time cifbuild 30.8565981388092s
#
# [COMMAND] [2024-11-30T23:53:34]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:34]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:34] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:34]
addattribute attributecomment="\"Telescope (mission) name\" \"RA of instrument pointing (degrees)\" \"Name of observed object\" \
\"Name of PI\" \"Observation mode (pointing or slew)\" \"Observation identifier\" \"DEC of instrument pointing\" \"Date observations \
were made\" \"Date observations ended\"" attributename="TELESCOP RA_PNT OBJECT OBSERVER OBS_MODE OBS_ID DEC_PNT DATE-OBS DATE-END" \
attributetype="string real string string string string real string string" realvalue="80.562501 -48.3000000" \
set=product/P0303820601OBX000CALIND0000.FIT stringvalue="\"XMM\" \"DLS J0522-4820\" \"Prof John P. Hughes\" \"POINTED\" \
\"0303820601\" \"2005-10-22T15:55:28.000\" \"2005-10-22T19:31:35.000\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:34]
# # [INFO] [2024-11-30T23:53:34] Task Run Time addattribute 0.0453310012817383s
#
# [COMMAND] [2024-11-30T23:53:34]
cp /scratch/226609.1.all.q/xmm/ppsprod/229754/product/P0303820601OBX000CALIND0000.FIT \
/scratch/226609.1.all.q/xmm/ppsprod/229754/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:34] System RV 0
# # [INFO] [2024-11-30T23:53:34] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:34] Instrument: all
# # [INFO] [2024-11-30T23:53:34] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:34] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:34]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:34]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:34] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:34]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:36] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.039978s between AHF entries 393\
#     (2005-10-22T16:50:27.000) and 394 (2005-10-22T17:07:16.000) - adjusting duration of entry 393 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.039978s between AHF entries 393\
#     (2005-10-22T16:50:27.000) and 394 (2005-10-22T17:07:16.000) - adjusting duration of entry 393 accordingly
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246388177.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246388177.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400219.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400219.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400220.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400220.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400221.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400221.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400222.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 246400222.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 53722 times 
# # [INFO] [2024-11-30T23:53:36] Task Run Time preqgti 1.65245294570923s
#
# [COMMAND] [2024-11-30T23:53:36]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:36]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:36] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:36]
atthkgen atthkset=product/P0303820601OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:36] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.039978s between AHF entries\
#     393 (2005-10-22T16:50:27.000) and 394 (2005-10-22T17:07:16.000) - adjusting duration of entry 393 accordingly
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383792.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -33.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383792.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -33.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383793.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -32.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383793.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -32.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383794.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -31.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383794.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -31.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383795.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -30.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383795.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -30.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383796.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -29.9999999702 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 246383796.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -29.9999999702 s away).
# ** atthkgen: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 6552 times 
# # [INFO] [2024-11-30T23:53:36] Task Run Time atthkgen 0.517465114593506s
#
# [COMMAND] [2024-11-30T23:53:36]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:36]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:36] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:36]
orbit outfile=product/P0303820601OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:37] orbit:- Output FITS Orbit timeseries: product/P0303820601OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.039978s between AHF entries 393 (2005-10-22T16:50:27.000) and 394\
#     (2005-10-22T17:07:16.000) - adjusting duration of entry 393 accordingly
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383792.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -33.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383793.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -32.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383794.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -31.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383795.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -30.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383796.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -29.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383797.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -28.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383798.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -27.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383799.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -26.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383800.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -25.9999999702 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 246383801.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -24.9999999702 s away).
# ** orbit: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 3271 times 
# # [INFO] [2024-11-30T23:53:37] Task Run Time orbit 0.493817090988159s
#
# [COMMAND] [2024-11-30T23:53:37]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:37]
export SAS_RAND_SEED=0303820601
# # [INFO] [2024-11-30T23:53:37] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0303820601
# [COMMAND] [2024-11-30T23:53:37]
radmonfix output=product/P0303820601OBX000RADMON0000.FIT radmonlist="odf/1075_0303820601_RMX00100ECX.FIT \
odf/1075_0303820601_RMX00200ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:37] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620373.9 which\
#     is outside the time correlation data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with\
#     large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620377.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620381.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620385.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620389.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620393.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620397.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620401.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620405.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=167620409.9 which is outside the time correlation\
#     data abscissa range [167621072, 167634647.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 1792 counts rows from row 1712
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 140 times 
# # [INFO] [2024-11-30T23:53:37] Task Run Time radmonfix 0.224411010742188s
#
# [COMMAND] [2024-11-30T23:53:37]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226609.1.all.q/xmm/ppsprod/229754/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:37] System RV 0
# # [INFO] [2024-11-30T23:53:37] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:37]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226609.1.all.q/xmm/ppsprod/229754/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:37] System RV 0
# [COMMAND] [2024-11-30T23:53:37]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226609.1.all.q/xmm/ppsprod/229754/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:37] System RV 0
# [COMMAND] [2024-11-30T23:53:37]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226609.1.all.q/xmm/ppsprod/229754/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:37] System RV 0
# # [INFO] [2024-11-30T23:53:37] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:37] Instrument: epn
# # [INFO] [2024-11-30T23:53:37] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:37] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:37] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:53:37] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:37] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:37] Exposure duration: 12848
# # [INFO] [2024-11-30T23:53:37] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:37] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:37] Instrument: epn
# # [INFO] [2024-11-30T23:53:37] Stream no.: 0002
# # [INFO] [2024-11-30T23:53:37] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:37] Checking exposure U601 for processability
# # [INFO] [2024-11-30T23:53:37] Exposure ignored due to lack of event files
