
#!/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:32:44] Module name: VerifyODF
# # [INFO] [2024-11-30T23:32:44] Instrument: all
# # [INFO] [2024-11-30T23:32:44] Stream no.: 0001
# # [INFO] [2024-11-30T23:32:44] Module version number: 1.18
# # [INFO] [2024-11-30T23:32:44] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:32:44] Module name: MakeCIF
# # [INFO] [2024-11-30T23:32:44] Instrument: all
# # [INFO] [2024-11-30T23:32:44] Stream no.: 0001
# # [INFO] [2024-11-30T23:32:44] Module version number: 1.23
# # [INFO] [2024-11-30T23:32:44] Observation start defined as >2001-08-25T02:25:43.000<
# # [INFO] [2024-11-30T23:32:44] Processing date defined as >2024-12-01T00:32:44<
# [COMMAND] [2024-11-30T23:32:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:32:44]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:32:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:32:44]
cifbuild analysisdate=2024-12-01T00:32:44 calindexset=product/P0110012201OBX000CALIND0000.FIT fullpath=no \
observationdate=2001-08-25T02:25:43.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:33:12]
# # [INFO] [2024-11-30T23:33:12] Task Run Time cifbuild 28.4465548992157s
#
# [COMMAND] [2024-11-30T23:33:12]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:33:12]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:33:12] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:33:12]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"Observation mode (pointing or slew)\" \
\"Date observations were made\" \"Date observations ended\" \"RA of instrument pointing (degrees)\" \"DEC of instrument pointing\" \
\"Name of PI\" \"Name of observed object\"" attributename="TELESCOP OBS_ID OBS_MODE DATE-OBS DATE-END RA_PNT DEC_PNT OBSERVER \
OBJECT" attributetype="string string string string string real real string string" realvalue="220.2375 -62.7186111" \
set=product/P0110012201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0110012201\" \"POINTED\" \"2001-08-25T02:25:43.000\" \
\"2001-08-25T04:34:27.000\" \"Prof Johan Bleeker\" \"RCW 86 (SW-S)\"" -w 10
# # [OUTPUT] [2024-11-30T23:33:12]
# # [INFO] [2024-11-30T23:33:12] Task Run Time addattribute 0.0425779819488525s
#
# [COMMAND] [2024-11-30T23:33:12]
cp /scratch/225408.1.all.q/xmm/ppsprod/228554/product/P0110012201OBX000CALIND0000.FIT \
/scratch/225408.1.all.q/xmm/ppsprod/228554/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:33:12] System RV 0
# # [INFO] [2024-11-30T23:33:12] Module name: GlobalHK
# # [INFO] [2024-11-30T23:33:12] Instrument: all
# # [INFO] [2024-11-30T23:33:12] Stream no.: 0001
# # [INFO] [2024-11-30T23:33:12] Module version number: 1.81
# [COMMAND] [2024-11-30T23:33:12]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:33:12]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:33:12] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:33:12]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:33:14] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101371.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101371.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101372.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101372.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101373.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101373.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101374.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101374.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101375.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000000149 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 115101375.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000000149 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 81414 times 
# # [INFO] [2024-11-30T23:33:14] Task Run Time preqgti 1.74374389648438s
#
# [COMMAND] [2024-11-30T23:33:14]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:33:14]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:33:14] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:33:14]
atthkgen atthkset=product/P0110012201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:33:14]
# # [INFO] [2024-11-30T23:33:14] Task Run Time atthkgen 0.267901182174683s
#
# [COMMAND] [2024-11-30T23:33:14]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:33:14]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:33:14] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:33:14]
orbit outfile=product/P0110012201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:33:15] orbit:- Output FITS Orbit timeseries: product/P0110012201OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:33:15] Task Run Time orbit 0.325094938278198s
#
# [COMMAND] [2024-11-30T23:33:15]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:33:15]
export SAS_RAND_SEED=0110012201
# # [INFO] [2024-11-30T23:33:15] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110012201
# [COMMAND] [2024-11-30T23:33:15]
radmonfix output=product/P0110012201OBX000RADMON0000.FIT radmonlist=odf/0313_0110012201_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:33:15] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325653.95 which\
#     is outside the time correlation data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325657.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325661.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325665.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325669.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325673.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325677.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325681.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325685.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=36325689.95 which is outside the time correlation\
#     data abscissa range [36327346.37, 36340263.59] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 2214 times 
# # [INFO] [2024-11-30T23:33:15] Task Run Time radmonfix 0.127628087997437s
#
# [COMMAND] [2024-11-30T23:33:15]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/225408.1.all.q/xmm/ppsprod/228554/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:33:15] System RV 0
# # [INFO] [2024-11-30T23:33:15] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:33:15]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/225408.1.all.q/xmm/ppsprod/228554/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:33:15] System RV 0
# [COMMAND] [2024-11-30T23:33:15]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/225408.1.all.q/xmm/ppsprod/228554/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:33:15] System RV 0
# [COMMAND] [2024-11-30T23:33:15]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/225408.1.all.q/xmm/ppsprod/228554/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:33:15] System RV 0
# # [INFO] [2024-11-30T23:33:15] Module name: ExpChooser
# # [INFO] [2024-11-30T23:33:15] Instrument: emos1
# # [INFO] [2024-11-30T23:33:15] Stream no.: 0001
# # [INFO] [2024-11-30T23:33:15] Module version number: 1.38
# # [INFO] [2024-11-30T23:33:15] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:33:15] Filter: CalClosed
# # [INFO] [2024-11-30T23:33:15] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:33:15] Exposure duration: 7713
# # [INFO] [2024-11-30T23:33:15] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:33:15] Module name: ExpChooser
# # [INFO] [2024-11-30T23:33:15] Instrument: emos2
# # [INFO] [2024-11-30T23:33:15] Stream no.: 0001
# # [INFO] [2024-11-30T23:33:15] Module version number: 1.38
# # [INFO] [2024-11-30T23:33:15] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:33:15] Filter: CalClosed
# # [INFO] [2024-11-30T23:33:15] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:33:15] Exposure duration: 7724
# # [INFO] [2024-11-30T23:33:15] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:33:15] Module name: ExpChooser
# # [INFO] [2024-11-30T23:33:15] Instrument: epn
# # [INFO] [2024-11-30T23:33:15] Stream no.: 0001
# # [INFO] [2024-11-30T23:33:15] Module version number: 1.38
# # [INFO] [2024-11-30T23:33:15] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:33:15] Filter: CalClosed
# # [INFO] [2024-11-30T23:33:15] Instrument mode: PrimeFullWindowExtended
# # [INFO] [2024-11-30T23:33:15] Exposure duration: 5746
# # [INFO] [2024-11-30T23:33:15] Exposure ignored due to invalid or unsupported filter
