
#!/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:52:47] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:47] Instrument: all
# # [INFO] [2024-11-30T23:52:47] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:47] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:47] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:47] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:47] Instrument: all
# # [INFO] [2024-11-30T23:52:47] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:47] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:47] Observation start defined as >2005-04-09T12:34:20.000<
# # [INFO] [2024-11-30T23:52:47] Processing date defined as >2024-12-01T00:52:47<
# [COMMAND] [2024-11-30T23:52:47]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:47]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:52:47] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:52:47]
cifbuild analysisdate=2024-12-01T00:52:47 calindexset=product/P0302260301OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-04-09T12:34:20.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:16]
# # [INFO] [2024-11-30T23:53:16] Task Run Time cifbuild 29.0969929695129s
#
# [COMMAND] [2024-11-30T23:53:16]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:16]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:53:16] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:53:16]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"Name of PI\" \"Date observations were \
made\" \"Observation mode (pointing or slew)\" \"DEC of instrument pointing\" \"Date observations ended\" \"RA of instrument \
pointing (degrees)\" \"Name of observed object\"" attributename="TELESCOP OBS_ID OBSERVER DATE-OBS OBS_MODE DEC_PNT DATE-END RA_PNT \
OBJECT" attributetype="string string string string string real string real string" realvalue="\"24.8952500\" \"129.5454165\"" \
set=product/P0302260301OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0302260301\" \"Prof D. Michael Crenshaw\" \
\"2005-04-09T12:34:20.000\" \"POINTED\" \"2005-04-09T14:14:11.000\" \"NGC2622\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:17]
# # [INFO] [2024-11-30T23:53:17] Task Run Time addattribute 0.0360140800476074s
#
# [COMMAND] [2024-11-30T23:53:17]
cp /scratch/226587.1.all.q/xmm/ppsprod/229732/product/P0302260301OBX000CALIND0000.FIT \
/scratch/226587.1.all.q/xmm/ppsprod/229732/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:17] System RV 0
# # [INFO] [2024-11-30T23:53:17] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:17] Instrument: all
# # [INFO] [2024-11-30T23:53:17] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:17] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:17]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:53:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:53:17]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:17] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437331.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 229437331.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 229437332.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437332.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437333.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437333.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437334.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437334.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437335.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229437335.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27.0000000298 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 28396 times 
# # [INFO] [2024-11-30T23:53:17] Task Run Time preqgti 0.893995046615601s
#
# [COMMAND] [2024-11-30T23:53:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:17]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:53:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:53:17]
atthkgen atthkset=product/P0302260301OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:18] ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437324.184 which is\
#     more than 20 s outside the period for which the attitude is known (closest time is -28 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437324.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -28 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437325.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -27 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437325.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -27 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437326.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -26 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437326.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -26 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437327.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -25 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437327.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -25 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437328.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -24 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 229437328.184 which is more than 20 s outside the period\
#     for which the attitude is known (closest time is -24 s away).
# ** atthkgen: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 28 times 
# # [INFO] [2024-11-30T23:53:18] Task Run Time atthkgen 0.211323976516724s
#
# [COMMAND] [2024-11-30T23:53:18]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:18]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:53:18] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:53:18]
orbit outfile=product/P0302260301OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:18] orbit:- Output FITS Orbit timeseries: product/P0302260301OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437324.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -28 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437325.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -27 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437326.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -26 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437327.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -25 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437328.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -24 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437329.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -23 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437330.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -22 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437331.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -21 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437332.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -30.0000000298 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 229437333.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -29.0000000298 s away).
# ** orbit: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 9 times 
# # [INFO] [2024-11-30T23:53:18] Task Run Time orbit 0.265959024429321s
#
# [COMMAND] [2024-11-30T23:53:18]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:18]
export SAS_RAND_SEED=0302260301
# # [INFO] [2024-11-30T23:53:18] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0302260301
# [COMMAND] [2024-11-30T23:53:18]
radmonfix output=product/P0302260301OBX000RADMON0000.FIT radmonlist="odf/0977_0302260301_RMX00100ECX.FIT \
odf/0977_0302260301_RMX00200ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:18] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673313.9 which\
#     is outside the time correlation data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673317.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673321.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673325.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673329.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673333.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673337.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673341.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673345.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=150673349.9 which is outside the time correlation\
#     data abscissa range [150674407.3, 150681581.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 1920 counts rows from row 380
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 447 times 
# # [INFO] [2024-11-30T23:53:18] Task Run Time radmonfix 0.143709897994995s
#
# [COMMAND] [2024-11-30T23:53:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226587.1.all.q/xmm/ppsprod/229732/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:18] System RV 0
# # [INFO] [2024-11-30T23:53:18] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226587.1.all.q/xmm/ppsprod/229732/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:18] System RV 0
# [COMMAND] [2024-11-30T23:53:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226587.1.all.q/xmm/ppsprod/229732/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:18] System RV 0
# [COMMAND] [2024-11-30T23:53:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226587.1.all.q/xmm/ppsprod/229732/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:18] System RV 0
# # [INFO] [2024-11-30T23:53:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:18] Instrument: emos1
# # [INFO] [2024-11-30T23:53:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:18] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:53:18] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:18] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:18] Exposure duration: 5273
# # [INFO] [2024-11-30T23:53:18] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:18] Instrument: emos2
# # [INFO] [2024-11-30T23:53:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:18] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:53:18] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:18] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:18] Exposure duration: 5284
# # [INFO] [2024-11-30T23:53:18] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:18] Instrument: om
# # [INFO] [2024-11-30T23:53:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:18] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:53:18] Filter: Blocked
# # [INFO] [2024-11-30T23:53:18] Instrument mode: CentroidingData
# # [INFO] [2024-11-30T23:53:18] Exposure duration: 300
# # [INFO] [2024-11-30T23:53:18] Exposure ignored due to invalid or unsupported filter
