ChangeLog for odffix
====================

Version 2.8.1 - 2025-01-21 (aI)
-----------------------------
	+ Varaibilty Alert Flag implemented (SPR-7819)

Version 2.8 - 2018-02-13 (EO)
-----------------------------
	+ This is a new major version of this package including a new GNU
	Public License Text disclaimer required to distribute the SAS source
	code to the Astronomical Community under the terms of the GNU Public
	License. The text as it is shown below is the same that has been 
	included in all SAS source code files.

	ESA (C) 2000-2018 

	This file is part of ESA's XMM-Newton Scientific Analysis System
	(SAS).

	SAS is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	SAS is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	   
	You should have received a copy of the GNU General Public License
	along with SAS.  If not, see <http://www.gnu.org/licenses/>.
	---------------------------------------------------------------------


Version 2.7 - 2005-03-02 (JSH)
-----------
	+ SPR2202 - (ahfgen.par, odffix.par) Tasks now accept Position Angle between 0 and 360

Version 2.6.2 - 2005-01-12 (AI)
-----------
	+ Documentation updated.
	
Version 2.6.1 - 2004-12-22 (AI)
-----------
	+ Extract filter keyword information from AUX file.

Version 2.6 - 2002-09-20 (GV)
-----------
	+ Updated headers for gcc-3.1
	+ Complete task.info files for auxiliary tasks.
	
Version 2.5 - 2002-05-14 (GV)
-----------
	+ Really updated for param-2.0

Version 2.4 - 2002-05-13 (GV)
-----------
	+ Updated for param 2.0
	

Version 2.3 - 2002-01-18 (GV)
-----------
	+ (odffix.info) change description to make it more explicit. SOC-SPR-2252.
	
Version 2.2 - 2001-10-01 (GV)
-----------
	+ (src/odffix.par) posangle range had been changed to 0-360. Go
	back to -180,180 as this breaks pms2odf. 
	
Version 2.1 - 2001-08-20 (GV)
-----------
	+ (src/main/OdfConstituent.cc) initialiaze ft to make optimizer
	happy (SOC-SPR-2133) 
	
Version 2.0 - 2001-03-16 (GV)
-----------
	+ OM NPHK column TYPE is now int32 (SOC-SPR-1925).
	+ (omphkgen_mod.f90) column H5215 is now 12A , value 'HI RES WIN'
	(SOC-SPR-1943).
	

Version 1.43 - 2001-03-02 (UL)
------------
	+ brought in line with caloalutils-1.43

Version 1.42 - 2000-08-18 (GV)
------------
	+ fix task info and parameter files to comply with new stricter
	specifications (chkdist) .
	
Version 1.41.5 - 2000-07-12 (GV)
--------------
	+ (src/main/OdfObject.*) exclude datasets with "X" from the
	exposure reckonming algorithm.

Version 1.41.4 - 2000-07-11 (GV)
--------------
	+ (src/main/ExposureObject.h) add .scheduled.
	+ (src/main/OdfConstituent.*) add sux_exposure.
	+ (src/main/OdfObject.*) account properly of scheduled/unscheduled
	flags, as the OAL is now sensitive to the difference.

Version 1.41.3 - 2000-07-03 (GV)
--------------
	+ (src/aux/rgsauxtable_mod.f90) updated to remove duplicate frame numbers.
	
Version 1.41.2 - 2000-06-23 (GV)
--------------
	+ (config/odffix.info) fix typo (SOC-SPR-1441).
	+ (doc/odffix_description.tex) fix broken documentation link
	(SOC-SPR-1553).	
	+ Now works on linux, although no specific change was made
	(SOC-SPR-843).
	
Version 1.41.1 - 2000-06-09 (GV)
--------------
	+ (OdfObject.cc) modify the logic of the date-checking algorithm
	(OdfObject::scan), so that the date in checked only for ODF
	constituents whose scheduled flag is S or U. X is ignored as these
	constituents refer to the whole observation instead of a single
	exposure (SOC-SPR-1465). Also, open the dataset only if the date
	has to be checked.
	+ (test/odf) Add one unscheduled exposure, also add one X file
	with abnormal DATE-XXX attributes.
	+ (test/testodffix.cc) update for above changes. Ask the OAL to
	confirm the start/end of the exposure that contains the X file.
	
Version 1.41 - 2000-05-22 (GV)
------------
	+ (config/Makefile) fix typo that prevented par/info files from being creaed.

Version 1.40 - 2000-05-19 (GV)
------------
	+ (src/main/OdfObject.cc) if the OM PWDF exists, do not overwrite it.
	+ add task info files.
	
Version 1.39 - 2000-04-25 (GV)
------------
	+ (src/main/Makefile) move metatask towards the end of
	USEDLIBS. This seems to help some machines not to get segfaults
	(??).
	

Version 1.38 - 2000-04-17 (GV)
------------
	+ (phkgen.cc): these are the ICD compliant names:

	if(iname == "EMOS1"){
	extname = "M1PEH1";
	ftcoarsename = "E1573";
	ftfinename = "EU573";
	} else if(iname == "EMOS2"){
	extname = "M2PEH1";
	ftcoarsename = "K1573";
	ftfinename = "KU573";
	} else if(iname == "EPN"){
	extname = "PNPMH1";
	ftcoarsename = "F1030";
	ftfinename = "FU036;
	
	
Version 1.37 - 2000-04-13 (GV)
------------
	+ (phkgen.cc) column names for the EPICs are now ICD compliant.
	
Version 1.36 2000-03-14 (GV)
------------
	+ (testodffix.cc) now use the OAL to check that the ODF summary
	file is ok.
	+ (OdfObject.cc) call rgsauxtable to fix wrap around in RGS
	auxiliary dataset tables.
	+ (rgsauxtable) new task, from PVideler.

Version 1.35 2000-03-08 (GV)
------------
	+ (OdfObject::scan()) update the map inst_exp_time_map only if
	  asked to check the date, otherwise do not use the new components
          for he calculation of the duration.

Version 1.34 2000-03-02 (GV)
------------
	+ (test/Makefile) fix USEDLIBS to make the static build work.

Version 1.33 2000-03-02 (GV)
------------
	+ (OdfObject.cc) OM THX file not generated if it alredy exists. A
	warning is issued (OMTrackingHistoryDataFileExists). This is in
	response to the PMS now creating these files.

Version 1.32 2000-02-04 (GV)
------------
	+ remove tools from DEPEND, as it was not being used.

Version 1.31 2000-01-21 (GV)
------------
	+ (OdfObject) the smarter algorithm below was not always
	working. Now that algorihm is part of a separate method (validate)
	that is invoked only on the first scan through the directory (to
	avoid repeated warnings) and is more robust against cases when all
	the DATE-XXX keywords are correct.

Version 1.30 2000-01-11 (GV)
------------
	+ (OdfObject) smarter algorithm to guess DATE-OBS/END. If there is
	at least one good DATE-OBS, use that as start time. Otherwise use
	now, and set end to be now + 3600s. If there is no good DATE-END,
	use start + 3600s.
	+ (phkgen) table names comply with ODF ICD. Write FTFINE as
	unsigned16.
	+ (tcfgen) ERTIME is now 23A, as per recent ICD changes.
	
Version 1.29 2000-01-10 (GV)
------------
	+ (OdfObject) keep tabs on the number of good DATE-OBS/END pairs,
	and if none is found make use of an arbitrary start/end time for
	the observation.

Version 1.28 2000-01-10 (GV)
------------
	+ (tcfgen) update for unsigned columns
	+ (nphkgen) same

Version 1.27 1999-12-17 (GV)
------------
	+ (omphkgen): create two extra columns H5215 and H5265

Version 1.26 1999-11-12 (GV)
------------
	+ some datasets were not being closed properly, causing a problem when odffix was run a second time on the same odf directory.
	+ adapt to chage interface for some utility functions in saslib.
	+ use COMBILIBS instead of hack for intermediate library.
	+ will terminate in error if the revolution identifier is not an integer.

Version 1.25 1999-10-08 (GV)
------------
	+ document findnominalpointing.
	+ fix typo that cause INSTRUMEN to be always OM for some HK files.
	+ in ODF summary file, write RA/DEC with more digits.

Version 1.24 1999-09-29 (MB GV)
------------
	+ findnominalpointing is now yes by default
	+ OM window starts now at 0,0 to match the scisim generated values
          for WINDOWX0 and WINDOWY0.

Version 1.23 1999-09-27 (MB)
------------
	+ OM window set to 512x512, binning 2^1 to correspond to the 
          default OM window in scisim of 256x256.

Version 1.22 1999-09-10
------------
	+ change fatals to errors.
	+ add DISTRIBUTION.
	+ (OdfObject::scan()) issue duration-related warnings only if
	number of files != 0. 
	+ (odffix.cc) use pointer to OdfObject to prevent constructor from
	being accidentally invoked in the current directory.

Version 1.21 1999-09-01
------------
	+ new parameter: findnominalpointing (default = no). If this is
	given, then odffix looks for an attitude history file and extracts
	the RA, DEC, PA from the first record. If the attitude history
	file does not exists, the default pointing is (0,0,90).

Version 1.20 1999-09-01
------------
	+ instead of being ignored,datasets with missing DATE-XXXX are
	listed in the odf summary file, but not used to calculate the
	observation's duration.

Version 1.19 1999-08-25
------------
	+ issue a warning if the AT history file is found.
	+ datasets with missing DATE-XXXX attributes are ignored now.
	
Version 1.18 1999-08-11
------------
	+ fix bug in DATE string sanity check
	+ add consistency checks to calculated date{start,end}
	+ ICD table name for attitue history and time correlation files
	+ observation duration was always 30ks: now it is start-end.

Version 1.17 1999-08-06
------------
	+ instrument for ATF changed to SC
	+ Periodic hk for rgs is _full_ periodic hk (PF instead of PE).
	+ force low memory model to reduce mem usage.
	+ check sanity of DATE strings

Version 1.16 1999-08-04
------------
	+ add hook purifySets to OdfObject: here clean up sets created by odffix.

Version 1.15 1999-08-04
------------
	+ tcfgen: fix bug that was adding the number of leap seconds to utcmilli

Version 1.14 1999-08-04
------------
	+ OM's thfgen now writes a few more attributes to the
	dataset.
        + tcfgen: round obtcoars_d[1] to nearest second instead of truncating it.

Version 1.13 1999-08-03
------------
	+ clarify the units of the input parameters

Version 1.12 1999-07-16
------------
        + Convert to decimal hours also the ra written in the boresight field
          of the ODF summary file.

Version 1.11 1999-07-13
------------
	+ RA from parameter ra is converted to decimal hours befor being
	written to the ODF summary file. Closes SPR 704.
	+ in periodic hk files, the INSTRUME keyword is correctly
	set. Cloes SPR 708.
	+ generates OM non periodic hk file.
	
Version 1.10 1999-06-15
------------
	+ creates empty reconstructed orbit file.
	
Version 1.9 1999-06-01
-----------
	+ changes to phkgen so that time tags are now correct. This closes
	SPR 670.
	
Version 1.8 1999-05-31
-----------
	+ ODF summary file now contains realistic RA/DEC (set via
	parameters). This closes SPR667 and related SPR669. 
	
Version 1.7 1999-05-26
-----------
	+ remove accidental tab in a parameter name.
	
Version 1.6 1999-05-25
-----------
	+ changed block names on OM files
	+ write FILENAME attribute in OM files
	+ do not create AHF if it exists already
	
Version 1.4 1999-04-06
-----------
        + clean up make files.
Version 1.3 1999-03-17
-----------
	+ fix proposal record in ODF summary file

Version 1.2 1999-03-11
-----------
	+ modify tcfgen so that its entries match the observation's
	tstart/tstop.
	
Version 1.1 1999-03-10
-----------
	+ fix make files. Need EXTERNALS = pgplot.

Version 1.0 1999-02-26
-----------
	+ update the documentation after review by the SSC.
	+ defaults for binax1 and binax2 in wdgen changed to 0.
	
Version 0.19 1999-02-22
------------
	+ update DEPEND to use sas 1.88 where a bug in Make.include
	prevented compilation.
	
Version 0.18 1999-02-19
------------
	+ name changed to odffix
	+ rename Odf.* OdfObject.* to eliminate a file name clash with the OAL.
        + rename Exposure.* ExposureObject.* for the same reason
        + the ODF summary file is now listed in the ODF summary file.
	
Version 0.16 1999-01-28
------------ 
	+ there was bug that made the TCF huge upon running
	odffix a second time in the same directory.
	+ add parameters: ra,dec,position angle. These are used to generate 
	the attitude history file.
		
Version 0.15 1999-01-26
------------
	+ typos in the documentation links fixed.
	+ added USEDLIBS = slatec
	
Version 0.14 1999-01-26
------------
	+ closes SPR 528, 564 (for the ODF summary file)
	+ change package name
	+ fix bug that was preventing some files from being listed in the
	ODF summary file. Now simply issue a warning.
	+ OM periodic hk file was being created with the wrong name
	+ added a number of attributes to data sets and tables. First step
	towards ICD compliance.
	+ documentation complete

Version 0.13 1998-12-11 (GV)
------------
        + change to DEPEND to match upgraded mssllib (GV)
        + changed HTR mode into Spectroscopy1x1ocb for RGS in the test harness.
          SciSim produces an erroneous '*' in the CCDOCB field in HTR mode. (MB)

Version 0.12 1998-12-08
------------
        + adjust dependency file.

Version 0.11 1998-12-01
------------
	+ scisimodf script now handles multiple exposures and uses
	  user-provided config files per exposure and per instrument. (MB)
        + odffix now handles multiple exposure correctly. (GV)
        + odffix now generates OM periodic hk, priority window data aux, 
          and tracking history aux data files. (GV)

Version 0.10 1998-11-25
-----------
	+ added OM auxiliary/periodic house keeping tasks, cloned from the test directory in omichai.

Version 0.9 1998-11-23
-----------
	+ more of the same tweaks

Version 0.8 1998-11-19
-----------
	+ more tweaks to the file names (GV)
	
Version 0.7 1998-11-19
-----------
	+ patched the name of the PHF, pending clarification on the ODF ICD.
        + tweak to test scripts; report path for debugging (MB)

Version 0.6 1998-11-17
-----------

        + fixed order of arguments; now really uses exposuretime. (MB)

Version 0.5 1998-11-17 
-----------

	+ generate TCF as well
	+ added sanity check to odffix: fatal if no valid ODF files found
	+ fixed typo in script below
        + added scisimodf script that runs scisim and produces an ODF (MB)
	
Version 0.4 1998-11-06 (GV)
-----------

	+ now write ODF to a file with the appropriate name
	+ added a few messages to inform the user

Version 0.3 1998-11-04 (GV)
-----------

	+ fix dependency problem.

Version 0.2 1998-10-27 (GV)
-----------

 - added generation of AHF and PHF.

	
Version 0.1
-----------

 - works only in the ODF directory, writes to stdout, no documentation.
 - Directory structure created by pkgmaker.