
#!/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 >2000-01-28T06:03:58.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=0115890901
# # [INFO] [2024-11-30T23:52:47] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:52:47]
cifbuild analysisdate=2024-12-01T00:52:47 calindexset=product/P0115890901OBX000CALIND0000.FIT fullpath=no \
observationdate=2000-01-28T06:03:58.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:17]
# # [INFO] [2024-11-30T23:53:17] Task Run Time cifbuild 30.1128640174866s
#
# [COMMAND] [2024-11-30T23:53:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:17]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:17]
addattribute attributecomment="\"Telescope (mission) name\" \"DEC of instrument pointing\" \"RA of instrument pointing (degrees)\" \
\"Name of observed object\" \"Name of PI\" \"Date observations were made\" \"Date observations ended\" \"Observation identifier\" \
\"Observation mode (pointing or slew)\"" attributename="TELESCOP DEC_PNT RA_PNT OBJECT OBSERVER DATE-OBS DATE-END OBS_ID OBS_MODE" \
attributetype="string real real string string string string string string" realvalue="\"0.5899722\" \"54.197208\"" \
set=product/P0115890901OBX000CALIND0000.FIT stringvalue="\"XMM\" \"HR1099\" \"Dr Norbert Schartel\" \"2000-01-28T06:03:58.000\" \
\"2000-01-28T06:33:59.000\" \"0115890901\" \"POINTED\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:18]
# # [INFO] [2024-11-30T23:53:18] Task Run Time addattribute 0.0768070220947266s
#
# [COMMAND] [2024-11-30T23:53:18]
cp /scratch/226594.1.all.q/xmm/ppsprod/229738/product/P0115890901OBX000CALIND0000.FIT \
/scratch/226594.1.all.q/xmm/ppsprod/229738/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:18] System RV 0
# # [INFO] [2024-11-30T23:53:18] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:18] Instrument: all
# # [INFO] [2024-11-30T23:53:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:18] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:18]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:18]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:18] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:18]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:19] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372115.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is -41 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372115.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -41 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372116.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -40 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372116.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -40 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372117.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -39 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372117.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -39 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372118.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -38 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372118.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -38 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372119.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -37 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 65372119.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -37 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 38 times 
# # [INFO] [2024-11-30T23:53:19] Task Run Time preqgti 1.83518505096436s
#
# [COMMAND] [2024-11-30T23:53:19]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:19]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:19] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:19]
atthkgen atthkset=product/P0115890901OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time atthkgen 0.281643867492676s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
orbit outfile=product/P0115890901OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:20] orbit:- Output FITS Orbit timeseries: product/P0115890901OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:53:20] Task Run Time orbit 0.26382303237915s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
radmonfix output=product/P0115890901OBX000RADMON0000.FIT radmonlist="odf/0025_0115890901_RMX00100ECX.FIT \
odf/0025_0115890901_RMX00200ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:20] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205126.858 which\
#     is outside the time correlation data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205130.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205134.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205138.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205142.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205146.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205150.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205154.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205158.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=4205162.858 which is outside the time correlation\
#     data abscissa range [4206189.997, 4236072.325] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 6575 counts rows from row 341
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 569 times 
# # [INFO] [2024-11-30T23:53:20] Task Run Time radmonfix 0.179051160812378s
#
# [COMMAND] [2024-11-30T23:53:20]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226594.1.all.q/xmm/ppsprod/229738/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:20] System RV 0
# # [INFO] [2024-11-30T23:53:20] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:20]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226594.1.all.q/xmm/ppsprod/229738/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:20] System RV 0
# [COMMAND] [2024-11-30T23:53:20]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226594.1.all.q/xmm/ppsprod/229738/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:20] System RV 0
# [COMMAND] [2024-11-30T23:53:20]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226594.1.all.q/xmm/ppsprod/229738/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:20] System RV 0
# # [INFO] [2024-11-30T23:53:20] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:20] Instrument: rgs2
# # [INFO] [2024-11-30T23:53:20] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:20] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:20] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:53:20] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:53:20] Module name: StampKeywords
# # [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: 2.09
# # [INFO] [2024-11-30T23:53:20] Getting ODS version from file\
#     /scratch/226594.1.all.q/xmm/ppsprod/229738/odf/0025_0115890901_SCX00000TCS.FIT
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" realvalue="" set=product/P0115890901OBX000CALIND0000.FIT \
stringvalue="\"229738\" \"0025\" \"2024-12-01T00:52:47\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.1.0\" \
\"XMM-Newton/SOC\" \"002\" \"CALIBRATION INDEX FILE\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.040916919708252s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" realvalue="" set=product/P0115890901OBX000ATTTSR0000.FIT \
stringvalue="\"229738\" \"0025\" \"2024-12-01T00:52:47\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.1.0\" \
\"XMM-Newton/SOC\" \"002\" \"ATTITUDE TIME SERIES\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.0833308696746826s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" realvalue="" set=product/P0115890901OBX000ORBTSR0000.FIT \
stringvalue="\"229738\" \"0025\" \"2024-12-01T00:52:47\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.1.0\" \
\"XMM-Newton/SOC\" \"002\" \"SPACECRAFT ORBIT\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.0609710216522217s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0115890901
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0115890901
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" realvalue="" set=product/P0115890901OBX000RADMON0000.FIT \
stringvalue="\"229738\" \"0025\" \"2024-12-01T00:52:47\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.1.0\" \
\"XMM-Newton/SOC\" \"002\" \"RADMON RATE\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.0788810253143311s
#
# [COMMAND] [2024-11-30T23:53:20]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# [COMMAND] [2024-11-30T23:53:21]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# [COMMAND] [2024-11-30T23:53:21]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
