Unverified Commit 50188b8e authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #895: the request to have the indication of the rest frequency...

fix issue #895: the request to have the indication of the rest frequency without to wait for the summar to be created lead to a new (#914)

Fitszilla version (1.23), the rest freqncy is now also reported in the header of the section table. This should also be tracked in
the Fitszilla document.
parent e95c40ea
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -111,3 +111,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/
	issue #689 - The dataset provided by weather station has been enlarged by the wind direction. The correctponding RAL 'wx' command will noe provided wind direction readout, as well
	issue #689 - The dataset provided by weather station has been enlarged by the wind direction. The correctponding RAL 'wx' command will noe provided wind direction readout, as well
    issue #621 - The maximum number of chars of the schedule file name is now 37 (extension included). This is done for fits file and archive issue with the lenght of the schedule name.
    issue #621 - The maximum number of chars of the schedule file name is now 37 (extension included). This is done for fits file and archive issue with the lenght of the schedule name.
    issue #853 - The setSection command can now accept a wildcard (*) as section identifier. This will allow to configure all backend sections with a single command
    issue #853 - The setSection command can now accept a wildcard (*) as section identifier. This will allow to configure all backend sections with a single command
    issue #895 - FitZilla version 1.23 released, the rest frequency is also added in the header of the Section table
 No newline at end of file
+4 −1
Original line number Original line Diff line number Diff line
@@ -23,9 +23,10 @@
#define FITS_VERSION11 "V.1.2"
#define FITS_VERSION11 "V.1.2"
#define FITS_VERSION12 "V.1.21"
#define FITS_VERSION12 "V.1.21"
#define FITS_VERSION13 "V.1.22"
#define FITS_VERSION13 "V.1.22"
#define FITS_VERSION14 "V.1.23"




#define CURRENT_VERSION FITS_VERSION13
#define CURRENT_VERSION FITS_VERSION14


#define DEFAULT_COMMENT CURRENT_VERSION" Created by  S. Righini, M. Bartolini  & A. Orlati"
#define DEFAULT_COMMENT CURRENT_VERSION" Created by  S. Righini, M. Bartolini  & A. Orlati"


@@ -42,6 +43,8 @@
#define HISTORY11 FITS_VERSION11" Frequency and bandwidth columns added to Section table reporting backend sampled band"
#define HISTORY11 FITS_VERSION11" Frequency and bandwidth columns added to Section table reporting backend sampled band"
#define HISTORY12 FITS_VERSION12" SubScan offsets added to the primary header"
#define HISTORY12 FITS_VERSION12" SubScan offsets added to the primary header"
#define HISTORY13 FITS_VERSION13" Summary file aligned to reference document"
#define HISTORY13 FITS_VERSION13" Summary file aligned to reference document"
#define HISTORY14 FITS_VERSION14" Rest frequency information also added in the header of section table"



#define CREDITS1  " "
#define CREDITS1  " "
#define CREDITS2  "These data are property of:"
#define CREDITS2  "These data are property of:"
+34 −1
Original line number Original line Diff line number Diff line
@@ -629,7 +629,7 @@ void CEngineThread::runLoop()
				ACS::doubleSeq fluxes;
				ACS::doubleSeq fluxes;
				ACS::longSeq feedsID;
				ACS::longSeq feedsID;
				ACS::longSeq ifsID;
				ACS::longSeq ifsID;
				ACS::doubleSeq atts;
				ACS::doubleSeq atts,restFreqs;
				ACS::longSeq sectionsID;
				ACS::longSeq sectionsID;
				ACS::stringSeq axisName,axisUnit;
				ACS::stringSeq axisName,axisUnit;


@@ -889,6 +889,39 @@ void CEngineThread::runLoop()
					impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately
					impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately
					m_data->setStatus(Management::MNG_FAILURE);
					m_data->setStatus(Management::MNG_FAILURE);
				}
				}
				m_info.getRestFreq(restFreqs);
				if (restFreqs.length()==1) {
					double rfValue;
					IRA::CString keyName;
			    	for (long j=0;j<m_data->getSectionsNumber();j++) {
						if (restFreqs[0]>0.0) rfValue=restFreqs[0];
						else rfValue=DOUBLE_DUMMY_VALUE;
						keyName.Format("RESTFREQ%d",j+1);
						if (!m_file->setSectionHeaderKey(keyName,rfValue,"Frequency resolution of the Nth section (MHz)")) {
							_EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()");
							impl.setFileName((const char *)m_data->getFileName());
							impl.setError(m_file->getLastError());
							impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately
							m_data->setStatus(Management::MNG_FAILURE);
						}
					}
				}
				else {
					double rfValue;
					IRA::CString keyName;
					for (long j=0;j<restFreqs.length();j++) {
						if (restFreqs[j]>0.0) rfValue=restFreqs[j];
						else rfValue=DOUBLE_DUMMY_VALUE;
						keyName.Format("RESTFREQ%d",j+1);
						if (!m_file->setSectionHeaderKey(keyName,rfValue,"Frequency resolution of the Nth section (MHz)")) {
							_EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()");
							impl.setFileName((const char *)m_data->getFileName());
							impl.setError(m_file->getLastError());
							impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately
							m_data->setStatus(Management::MNG_FAILURE);
						}
					}	
				}
				CFitsWriter::TFeedHeader *feedH=m_info.getFeedHeader();
				CFitsWriter::TFeedHeader *feedH=m_info.getFeedHeader();
				if (!m_file->addFeedTable("FEED TABLE")) {
				if (!m_file->addFeedTable("FEED TABLE")) {
					_EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()");
					_EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()");
+2 −1
Original line number Original line Diff line number Diff line
@@ -235,6 +235,7 @@ bool CFitsWriter::create()
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY11,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY11,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY12,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY12,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY13,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY13,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY14,m_lastError)) return false;	
	
	
	if (!CFitsTools::primaryHeaderComment(pFits,CREDITS1,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(pFits,CREDITS1,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(pFits,CREDITS2,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(pFits,CREDITS2,m_lastError)) return false;
+1 −0
Original line number Original line Diff line number Diff line
@@ -63,6 +63,7 @@ bool CSummaryWriter::create()
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY11,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY11,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY12,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY12,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY13,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY13,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY14,m_lastError)) return false;
	
	
	if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS1,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS1,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS2,m_lastError)) return false;
	if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS2,m_lastError)) return false;