Commit 4397b1ea authored by Andrea Orlat's avatar Andrea Orlat
Browse files

NoData Fits, data columns even not created in DATATABLE

parent d29fd9ba
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -143,12 +143,13 @@ public:
	 * @param sourceFlux for each backend section it reports the estimated source flux computed with section parameters
	 * @param atts attenuation, one for each input of the backend
	 * @param name name of the sections table
	 * @param noData if true the data columns will not be added to the DATATable
	 * @param rfName name of the RF inputs table
	 * @return false if the operation is not successful
	 */
	bool addSectionTable(const ACS::longSeq &sectionID, const ACS::longSeq& feedsID, const ACS::longSeq& ifsID,const ACS::longSeq& pols,const ACS::doubleSeq& los,
			const ACS::doubleSeq& skyFreq,const ACS::doubleSeq& skyBandWidth,const ACS::doubleSeq& marks,
			const ACS::doubleSeq& sourceFlux,const ACS::doubleSeq& atts,const IRA::CString& name="SECTION TABLE",const IRA::CString& rfName="RF INPUTS");
			const ACS::doubleSeq& sourceFlux,const ACS::doubleSeq& atts,bool noData,const IRA::CString& name="SECTION TABLE",const IRA::CString& rfName="RF INPUTS");

	/**
	 * It allows to add the servo table to the file
+1 −1
Original line number Diff line number Diff line
@@ -790,7 +790,7 @@ void CEngineThread::runLoop()
					impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately
					m_data->setStatus(Management::MNG_FAILURE);
				}
				if (!m_file->addSectionTable(sectionsID,feedsID,ifsID,polarizations,LocalOscillator,skyFreq,skyBw,calib,fluxes,atts)) {
				if (!m_file->addSectionTable(sectionsID,feedsID,ifsID,polarizations,LocalOscillator,skyFreq,skyBw,calib,fluxes,atts,m_data->getIsNoData())) {
					_EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()");
					impl.setFileName((const char *)m_data->getFileName());
					impl.setError(m_file->getLastError());
+6 −4
Original line number Diff line number Diff line
@@ -482,7 +482,7 @@ bool CFitsWriter::addFeedTable(const IRA::CString& name)

bool CFitsWriter::addSectionTable(const ACS::longSeq &sectionID, const ACS::longSeq& feedsID, const ACS::longSeq& ifsID,const ACS::longSeq& pols,const ACS::doubleSeq& los,
		const ACS::doubleSeq& skyFreq,const ACS::doubleSeq& skyBandWidth,const ACS::doubleSeq& marks,const ACS::doubleSeq& sourceFlux,const ACS::doubleSeq& atts,
		const IRA::CString& name,const IRA::CString& rfName)
		bool noData,const IRA::CString& name,const IRA::CString& rfName)
{
	std::vector<long> id;
	std::vector<long> bins;
@@ -521,7 +521,6 @@ bool CFitsWriter::addSectionTable(const ACS::longSeq &sectionID, const ACS::long
		fluxIterator+=m_channels[i].inputs;
		// creation of the channels columns for the data table......
		colName << "Ch" << m_channels[i].id;
	    DataColName.push_back(colName.str());		
		if (m_channels[i].polarization==Backends::BKND_FULL_STOKES) {
			sect_type.push_back("stokes");
			type << (4 * bins[i]) << data_type; //full stokes
@@ -530,8 +529,11 @@ bool CFitsWriter::addSectionTable(const ACS::longSeq &sectionID, const ACS::long
			sect_type.push_back("simple");
			type <<  (1 * bins[i]) << data_type;
		}
		if (!noData) {
		    DataColName.push_back(colName.str());
			DataColForm.push_back(type.str());
			DataColUnit.push_back("");
		}

		if (m_channels[i].inputs>1) {
			tsysType << (m_channels[i].inputs) << "D";;
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
		printf("FITS Error: %s\n",(const char *)file->getLastError());
		exit(-1);
	}
	if (!file->addSectionTable(sectionsID,feedsID,ifsID,pols,los,skyFreq,skyBw,calib,flux,atts)) {
	if (!file->addSectionTable(sectionsID,feedsID,ifsID,pols,los,skyFreq,skyBw,calib,flux,atts,false)) {
		printf("FITS Error: %s\n",(const char *)file->getLastError());
		exit(-1);
	}