
#!/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:49] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:49] Instrument: all
# # [INFO] [2024-11-30T23:52:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:49] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:49] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:49] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:49] Instrument: all
# # [INFO] [2024-11-30T23:52:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:49] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:49] Observation start defined as >2000-08-14T01:33:19.000<
# # [INFO] [2024-11-30T23:52:49] Processing date defined as >2024-12-01T00:52:49<
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:52:49]
cifbuild analysisdate=2024-12-01T00:52:49 calindexset=product/P0110011101OBX000CALIND0000.FIT fullpath=no \
observationdate=2000-08-14T01:33:19.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time cifbuild 30.801549911499s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"Date observations were made\" \"Observation \
identifier\" \"Name of observed object\" \"Date observations ended\" \"DEC of instrument pointing\" \"RA of instrument pointing \
(degrees)\" \"Observation mode (pointing or slew)\"" attributename="TELESCOP OBSERVER DATE-OBS OBS_ID OBJECT DATE-END DEC_PNT RA_PNT \
OBS_MODE" attributetype="string string string string string string real real string" realvalue="\"58.8011111\" \"350.9083335\"" \
set=product/P0110011101OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Prof Johan Bleeker\" \"2000-08-14T01:33:19.000\" \"0110011101\" \
\"Cas A (SE)\" \"2000-08-14T03:59:47.000\" \"POINTED\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.0336999893188477s
#
# [COMMAND] [2024-11-30T23:53:20]
cp /scratch/226582.1.all.q/xmm/ppsprod/229730/product/P0110011101OBX000CALIND0000.FIT \
/scratch/226582.1.all.q/xmm/ppsprod/229730/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:20] System RV 0
# # [INFO] [2024-11-30T23:53:20] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:20] Instrument: all
# # [INFO] [2024-11-30T23:53:20] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:20] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:53:20]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:26] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604062.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 82604062.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 82604063.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604063.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604064.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604064.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604065.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604065.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604066.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 82604066.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 271638 times 
# # [INFO] [2024-11-30T23:53:26] Task Run Time preqgti 5.52336001396179s
#
# [COMMAND] [2024-11-30T23:53:26]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:26]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:53:26] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:53:26]
atthkgen atthkset=product/P0110011101OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:26] ** atthkgen: warning (NoAttitude), The attitude was requested for time 82604063.184 which is more\
#     than 20 s outside the period for which the attitude is known (closest time is -30 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 82604063.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -30 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 82604064.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -29 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 82604064.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -29 s away).
# ** atthkgen: warning (NoAttitude), The attitude was requested for time 82604065.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 82604065.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 82604066.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 82604066.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 82604067.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 82604067.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -26 s away).
# ** atthkgen: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 10 times 
# # [INFO] [2024-11-30T23:53:26] Task Run Time atthkgen 0.299215078353882s
#
# [COMMAND] [2024-11-30T23:53:26]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:26]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:53:26] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:53:26]
orbit outfile=product/P0110011101OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:26] orbit:- Output FITS Orbit timeseries: product/P0110011101OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (NoAttitude), The attitude was requested for time 82604063.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -30 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 82604064.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -29 s away).
# ** orbit: warning (NoAttitude), The attitude was requested for time 82604065.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 82604066.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 82604067.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 82604068.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 82604069.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 82604070.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 82604071.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 82604072.184 which is more than 20 s outside the period for\
#     which the attitude is known (closest time is -21 s away). 
# # [INFO] [2024-11-30T23:53:26] Task Run Time orbit 0.395813941955566s
#
# [COMMAND] [2024-11-30T23:53:26]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:26]
export SAS_RAND_SEED=0110011101
# # [INFO] [2024-11-30T23:53:26] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0110011101
# [COMMAND] [2024-11-30T23:53:26]
radmonfix output=product/P0110011101OBX000RADMON0000.FIT radmonlist=odf/0125_0110011101_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:26] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843237.945 which\
#     is outside the time correlation data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843241.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843245.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843249.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843253.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843257.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843261.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843265.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843269.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3843273.945 which is outside the time correlation\
#     data abscissa range [3844218.946, 3851986.751] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 302 times 
# # [INFO] [2024-11-30T23:53:26] Task Run Time radmonfix 0.138940095901489s
#
# [COMMAND] [2024-11-30T23:53:26]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226582.1.all.q/xmm/ppsprod/229730/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:26] System RV 0
# # [INFO] [2024-11-30T23:53:26] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:26]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226582.1.all.q/xmm/ppsprod/229730/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:27] System RV 0
# [COMMAND] [2024-11-30T23:53:27]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226582.1.all.q/xmm/ppsprod/229730/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:27] System RV 0
# [COMMAND] [2024-11-30T23:53:27]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226582.1.all.q/xmm/ppsprod/229730/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:27] System RV 0
# # [INFO] [2024-11-30T23:53:27] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:27] Instrument: emos1
# # [INFO] [2024-11-30T23:53:27] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:27] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:27] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:53:27] Filter: Unknown
# # [INFO] [2024-11-30T23:53:27] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:27] Exposure duration: 8788
# # [INFO] [2024-11-30T23:53:27] Warning to DB: Warning: Filter/Mode: Unknown/PrimeFullWindow. expTime: 8788 s
# # [INFO] [2024-11-30T23:53:27] ## DEBUG Insert errortext: Warning: Filter/Mode: Unknown/PrimeFullWindow. expTime: 8788 s into data\
#     base: 'mainprocesstime' table.
# # [INFO] [2024-11-30T23:53:27] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:27] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:27] Instrument: emos2
# # [INFO] [2024-11-30T23:53:27] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:27] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:27] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:53:27] Filter: Unknown
# # [INFO] [2024-11-30T23:53:27] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:27] Exposure duration: 520
# # [INFO] [2024-11-30T23:53:27] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:27] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:27] Instrument: emos2
# # [INFO] [2024-11-30T23:53:27] Stream no.: 0002
# # [INFO] [2024-11-30T23:53:27] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:27] Checking exposure U003 for processability
# # [INFO] [2024-11-30T23:53:27] Filter: Closed
# # [INFO] [2024-11-30T23:53:27] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:27] Exposure duration: 7882
# # [INFO] [2024-11-30T23:53:27] Exposure ignored due to invalid or unsupported filter
