
#!/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:37:46] Module name: VerifyODF
# # [INFO] [2024-11-30T23:37:46] Instrument: all
# # [INFO] [2024-11-30T23:37:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:37:46] Module version number: 1.18
# # [INFO] [2024-11-30T23:37:46] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:37:46] Module name: MakeCIF
# # [INFO] [2024-11-30T23:37:46] Instrument: all
# # [INFO] [2024-11-30T23:37:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:37:46] Module version number: 1.23
# # [INFO] [2024-11-30T23:37:46] Observation start defined as >2000-01-20T05:09:56.000<
# # [INFO] [2024-11-30T23:37:46] Processing date defined as >2024-12-01T00:37:46<
# [COMMAND] [2024-11-30T23:37:46]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:37:46]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:37:46] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:37:46]
cifbuild analysisdate=2024-12-01T00:37:46 calindexset=product/P0115700101OBX000CALIND0000.FIT fullpath=no \
observationdate=2000-01-20T05:09:56.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:38:14]
# # [INFO] [2024-11-30T23:38:14] Task Run Time cifbuild 27.8547129631042s
#
# [COMMAND] [2024-11-30T23:38:14]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:38:14]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:38:14] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:38:14]
addattribute attributecomment="\"Telescope (mission) name\" \"Date observations ended\" \"Name of observed object\" \"RA of \
instrument pointing (degrees)\" \"Observation identifier\" \"Name of PI\" \"DEC of instrument pointing\" \"Date observations were \
made\" \"Observation mode (pointing or slew)\"" attributename="TELESCOP DATE-END OBJECT RA_PNT OBS_ID OBSERVER DEC_PNT DATE-OBS \
OBS_MODE" attributetype="string string string real string string real string string" realvalue="\"0\" \"0.0000000\"" \
set=product/P0115700101OBX000CALIND0000.FIT stringvalue="\"XMM\" \"2000-01-20T06:42:53.000\" \"Send p-n OFFSET\" \"0115700101\" \"Mr \
Fred Jansen XMM-Newton PS\" \"2000-01-20T05:09:56.000\" \"POINTED\"" -w 10
# # [OUTPUT] [2024-11-30T23:38:14]
# # [INFO] [2024-11-30T23:38:14] Task Run Time addattribute 0.0366909503936768s
#
# [COMMAND] [2024-11-30T23:38:14]
cp /scratch/225550.1.all.q/xmm/ppsprod/228696/product/P0115700101OBX000CALIND0000.FIT \
/scratch/225550.1.all.q/xmm/ppsprod/228696/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:38:14] System RV 0
# # [INFO] [2024-11-30T23:38:14] Module name: GlobalHK
# # [INFO] [2024-11-30T23:38:14] Instrument: all
# # [INFO] [2024-11-30T23:38:14] Stream no.: 0001
# # [INFO] [2024-11-30T23:38:14] Module version number: 1.81
# [COMMAND] [2024-11-30T23:38:14]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:38:14]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:38:14] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:38:14]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:38:17] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.450001s between AHF entries\
#     3993 (2000-01-20T13:46:09.999) and 3994 (2000-01-20T13:46:53.999) - adjusting duration of entry 3993 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.580078s between AHF entries 5432 (2000-01-21T04:57:12.000) and\
#     5433 (2000-01-21T05:46:30.000) - adjusting duration of entry 5432 accordingly
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 64737865.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 64737865.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 64737866.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 64737866.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 64737867.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 64737867.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 64737868.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 64737868.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 64737869.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 22 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 64737869.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 22 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 166062 times 
# # [INFO] [2024-11-30T23:38:17] Task Run Time preqgti 3.2500479221344s
#
# [COMMAND] [2024-11-30T23:38:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:38:17]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:38:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:38:17]
atthkgen atthkset=product/P0115700101OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:38:17]
# # [INFO] [2024-11-30T23:38:17] Task Run Time atthkgen 0.270040035247803s
#
# [COMMAND] [2024-11-30T23:38:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:38:17]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:38:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:38:17]
orbit outfile=product/P0115700101OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:38:17] orbit:- Output FITS Orbit timeseries: product/P0115700101OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:38:17] Task Run Time orbit 0.29939603805542s
#
# [COMMAND] [2024-11-30T23:38:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:38:17]
export SAS_RAND_SEED=0115700101
# # [INFO] [2024-11-30T23:38:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115700101
# [COMMAND] [2024-11-30T23:38:17]
radmonfix output=product/P0115700101OBX000RADMON0000.FIT radmonlist=odf/0021_0115700101_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:38:18] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526526.858 which\
#     is outside the time correlation data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526530.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526534.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526538.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526542.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526546.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526550.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526554.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526558.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=3526562.858 which is outside the time correlation\
#     data abscissa range [3528305.504, 3543547.497] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 629 times 
# # [INFO] [2024-11-30T23:38:18] Task Run Time radmonfix 0.165929079055786s
#
# [COMMAND] [2024-11-30T23:38:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/225550.1.all.q/xmm/ppsprod/228696/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:38:18] System RV 0
# # [INFO] [2024-11-30T23:38:18] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:38:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/225550.1.all.q/xmm/ppsprod/228696/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:38:18] System RV 0
# [COMMAND] [2024-11-30T23:38:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/225550.1.all.q/xmm/ppsprod/228696/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:38:18] System RV 0
# [COMMAND] [2024-11-30T23:38:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/225550.1.all.q/xmm/ppsprod/228696/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:38:18] System RV 0
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0003
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S402 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0004
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S403 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0005
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S404 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0006
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S406 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0007
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S407 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0008
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S408 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0009
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S409 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0010
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S410 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0011
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S411 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S400 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:38:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:38:18] Instrument: epn
# # [INFO] [2024-11-30T23:38:18] Stream no.: 0002
# # [INFO] [2024-11-30T23:38:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:38:18] Checking exposure S401 for processability
# # [INFO] [2024-11-30T23:38:18] Exposure ignored due to lack of event files
