source: tags/release-1.4/src/Outputs/columns.cc @ 1391

Last change on this file since 1391 was 1219, checked in by MatthewWhiting, 11 years ago

Commenting the recent changes to columns.cc

File size: 21.9 KB
Line 
1// -----------------------------------------------------------------------
2// columns.cc: Define a set of columns for Duchamp output.
3// -----------------------------------------------------------------------
4// Copyright (C) 2006, Matthew Whiting, ATNF
5//
6// This program is free software; you can redistribute it and/or modify it
7// under the terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 2 of the License, or (at your
9// option) any later version.
10//
11// Duchamp is distributed in the hope that it will be useful, but WITHOUT
12// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14// for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with Duchamp; if not, write to the Free Software Foundation,
18// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
19//
20// Correspondence concerning Duchamp may be directed to:
21//    Internet email: Matthew.Whiting [at] atnf.csiro.au
22//    Postal address: Dr. Matthew Whiting
23//                    Australia Telescope National Facility, CSIRO
24//                    PO Box 76
25//                    Epping NSW 1710
26//                    AUSTRALIA
27// -----------------------------------------------------------------------
28#include <iostream>
29#include <sstream>
30
31#include <math.h>
32#include <duchamp/duchamp.hh>
33#include <duchamp/fitsHeader.hh>
34#include <vector>
35#include <string>
36#include <duchamp/Detection/detection.hh>
37#include <duchamp/Outputs/columns.hh>
38
39namespace duchamp
40{
41
42  namespace Catalogues
43  {
44
45
46    Column::Column()
47    {
48      /// @brief Set the default values for the parameters.
49      this->itsWidth=1;
50      this->itsPrecision=0;
51      this->itsName=" ";
52      this->itsUnits=" ";
53      this->itsType="";
54      this->itsUCD = "";
55      this->itsDatatype = "";
56      this->itsExtraInfo="";
57      this->itsColID="";
58    }
59
60    Column::Column(std::string type)
61    {
62      operator=(defaultColumn(type));
63    }
64
65    Column::Column(const Column& c)
66    {
67      operator=(c);
68    }
69
70    Column& Column::operator=(const Column& c)
71    {
72      if(this==&c) return *this;
73      this->itsWidth = c.itsWidth;
74      this->itsPrecision = c.itsPrecision;
75      this->itsName = c.itsName;
76      this->itsUnits = c.itsUnits;
77      this->itsUCD = c.itsUCD;
78      this->itsDatatype = c.itsDatatype;
79      this->itsExtraInfo = c.itsExtraInfo;
80      this->itsColID = c.itsColID;
81      this->itsType = c.itsType;
82      return *this;
83    }
84
85    Column::Column(std::string type, std::string name, std::string units, int width, int prec, std::string ucd, std::string datatype, std::string colID, std::string extraInfo):
86      itsType(type), itsName(name), itsUnits(units), itsWidth(width), itsPrecision(prec), itsUCD(ucd), itsDatatype(datatype), itsColID(colID), itsExtraInfo(extraInfo)
87    {
88      /// A generic constructor designed to make a Column other than
89      /// the predefined ones listed in the Column namespace
90      /// \param name The title of the column
91      /// \param units What units the column takes
92      /// \param width The starting width
93      /// \param prec The starting precision
94      /// \param ucd The UCD relating to the quantity (VOTable use only)
95      /// \param datatype The datatype (float/char/int/etc) of the quantity (VOTable)
96      /// \param colID The column ID string used in the FIELD entry of a VOTable
97      /// \param extraInfo Other information used in the VOTable (eg. a reference to a COOSYS)
98   }
99
100    //------------------------------------------------------------
101
102    void Column::changePrec(int p)
103    {
104      /// A direct way to alter the precision without having to use
105      /// Column::upPrec(). If the precision increases, the width will
106      /// increase by the same amount. If it decreases, no change is
107      /// made to the width.
108      /// \param p The new precision value.
109
110      if(p > this->itsPrecision) this->itsWidth += (p-this->itsPrecision);
111      this->itsPrecision = p;
112
113    }
114
115      void Column::checkPrec(double val)
116      {
117          /// Checks a decimal value to see if it is in -1<val<1. If
118          /// so, we need sufficient precision to represent at least
119          /// one significant figure.
120          if((fabs(val)<1.)){
121              int impliedPrec = int(fabs(log10(val))+1);
122              for(int i=this->itsPrecision;i<=impliedPrec;i++) this->upPrec();
123          }
124      }
125
126      void Column::checkWidth(int width)
127      {
128          /// Three checks on the width, looking at the name, the
129          /// units string, and then some minimum width. This can be
130          /// obtained from the other check() functions that work
131          /// from various value types.
132
133          for(int i=this->itsWidth;i<=width;i++) this->widen();// +1 for the space
134          for(int i=this->itsWidth;i<=int(this->itsName.size());i++) this->widen();  // +1 for the space
135          for(int i=this->itsWidth;i<=int(this->itsUnits.size());i++) this->widen(); // +1 for the space
136
137      }
138
139    //------------------------------------------------------------
140    void Column::printTitle(std::ostream &stream)
141    {
142      stream << std::setw(this->itsWidth)
143             << std::setfill(' ')
144             << this->itsName;
145    }
146
147    void Column::printUnits(std::ostream &stream)
148    {
149      stream << std::setw(this->itsWidth)
150             << std::setfill(' ')
151             << this->itsUnits;
152    }
153 
154    void Column::printDash (std::ostream &stream)
155    {
156      stream << std::setw(this->itsWidth)
157             << std::setfill('-')
158             << ""
159             << std::setfill(' ');
160    }
161
162    void Column::printBlank(std::ostream &stream)
163    {
164      stream << std::setw(this->itsWidth)
165             << std::setfill(' ')
166             << "";
167    }
168 
169    template <class T> void Column::printEntry(std::ostream &stream, T value)
170    {
171      ///  \param stream Where the printing is done.
172      ///  \param value  The value to be printed.
173
174      stream << std::setprecision(this->itsPrecision)
175             << std::setw(this->itsWidth)
176             << std::setfill(' ')
177             << value;
178    }
179    template void Column::printEntry<int>(std::ostream &stream, int value);
180    template void Column::printEntry<long>(std::ostream &stream, long value);
181    template void Column::printEntry<unsigned int>(std::ostream &stream, unsigned int value);
182    template void Column::printEntry<unsigned long>(std::ostream &stream, unsigned long value);
183    template void Column::printEntry<float>(std::ostream &stream, float value);
184    template void Column::printEntry<double>(std::ostream &stream, double value);
185    template void Column::printEntry<std::string>(std::ostream &stream, std::string value);
186
187 
188    bool Column::doCol(DESTINATION tableType, bool flagFint)
189    {
190      ///  @details Determines whether a given column is used for a
191      ///  given table type, based on the Column::type string.
192      /// \param tableType The type of table: one of FILE, SCREEN, LOG, VOTABLE.
193      /// \param flagFint Whether to use FINT (true) or FTOT
194      /// (false). This defaults to true, so need not be given. It only
195      /// applies to the screen and votable cases -- both are written for the
196      /// results file case.
197      /// \return True if column is used for given table type. False
198      /// otherwise. False if tableType not one of four listed.
199     
200 
201      const size_t sizeFileList=39;
202      std::string FileList[sizeFileList]={"NUM","NAME","X","Y","Z","RA","DEC","VEL","MAJ","MIN","PA","WRA","WDEC",
203                                          "W50","W20","WVEL","FINT", "FINTERR", "FTOT", "FTOTERR", "FPEAK","SNRPEAK",
204                                          "X1","X2","Y1","Y2","Z1","Z2","NPIX","FLAG","XAV","YAV",
205                                          "ZAV","XCENT","YCENT","ZCENT","XPEAK","YPEAK","ZPEAK"};
206      const size_t sizeScreenList=22;
207      std::string ScreenList[sizeScreenList]={"NUM","NAME","X","Y","Z","RA","DEC","VEL","MAJ","MIN","PA",
208                                              "W50","FPEAK","SNRPEAK","X1","X2","Y1",
209                                              "Y2","Z1","Z2","NPIX","FLAG"};
210      const size_t sizeLogList=16;
211      std::string LogList[sizeLogList]={"NUM","X","Y","Z","FTOT","FPEAK","SNRPEAK",
212                                        "X1","X2","Y1","Y2","Z1","Z2","NPIX","NUMCH","SPATSIZE"};
213      const size_t sizeVOList=23;
214      std::string VOList[sizeVOList]={"NUM","NAME","RAJD","DECJD","VEL","MAJ","MIN","PA",
215                                      "W50","W20","WVEL","FPEAK","SNRPEAK","FLAG","XAV","YAV",
216                                      "ZAV","XCENT","YCENT","ZCENT","XPEAK","YPEAK","ZPEAK"};
217
218      bool doIt=false;
219      if(tableType == FILE){
220        for(size_t i=0;i<sizeFileList && !doIt;i++) doIt = doIt || (this->itsType==FileList[i]);
221      }
222      else if(tableType == SCREEN){
223        if(this->itsType=="FTOT") doIt = !flagFint;
224        else if(this->itsType == "FINT") doIt = flagFint;
225        else for(size_t i=0;i<sizeScreenList && !doIt;i++) doIt = doIt || (this->itsType==ScreenList[i]);
226      }
227      else if(tableType == LOG){
228        for(size_t i=0;i<sizeLogList && !doIt;i++) doIt = doIt || (this->itsType==LogList[i]);
229      }
230      else if(tableType == VOTABLE){
231        if(this->itsType=="FTOT" || this->itsType=="FTOTERR") doIt = !flagFint;
232        else if(this->itsType == "FINT" || this->itsType=="FINTERR") doIt = flagFint;
233        else for(size_t i=0;i<sizeVOList && !doIt;i++) doIt = doIt || (this->itsType==VOList[i]);
234      }
235      return doIt;
236       
237    }
238
239    Column defaultColumn(std::string type)
240    {
241      // type|name|units|width|prec|ucd|datatype|extraInfo
242      if (type == "NUM") return Column(type,"ObjID","",6,0,"meta.id","int","col_objnum","");
243      else if(type=="NAME") return Column(type,"Name","",8,0,"meta.id;meta.main","char","col_name","");
244      else if(type=="X") return Column(type,"X","",6,prXYZ,"pos.cartesian.x","float","col_x","");
245      else if(type=="Y") return Column(type,"Y","",6,prXYZ,"pos.cartesian.y","float","col_y","");
246      else if(type=="Z") return Column(type,"Z","",6,prXYZ,"pos.cartesian.z","float","col_z","");
247      else if(type=="RA") return Column(type,"RA","",11,0,"","char","col_ra",coordRef);
248      else if(type=="DEC") return Column(type,"DEC","",10,0,"","char","col_dec",coordRef);
249      else if(type=="RAJD") return Column(type,"RAJD","[deg]",11,prPOS,"","float","col_rajd",coordRef);
250      else if(type=="DECJD") return Column(type,"DECJD","[deg]",11,prPOS,"","float","col_decjd",coordRef);
251      else if(type=="VEL") return Column(type,"VEL","",7,prVEL,"","float","col_vel","");
252      else if(type=="MAJ") return Column(type,"MAJ","[deg]",6,prWPOS,"phys.angSize.smajAxis","float","col_maj",coordRef);
253      else if(type=="MIN") return Column(type,"MIN","[deg]",6,prWPOS,"phys.angSize.sminAxis","float","col_min",coordRef);
254      else if(type=="PA") return Column(type,"PA","[deg]",7,prWPOS,"pos.posAng;phys.angSize","float","col_pa",coordRef);
255      else if(type=="WRA") return Column(type,"w_RA","[arcmin]",9,prWPOS,"","float","col_wra",coordRef);
256      else if(type=="WDEC") return Column(type,"w_DEC","[arcmin]",9,prWPOS,"","float","col_wdec",coordRef);
257      else if(type=="W50") return Column(type,"w_50","",7,prVEL,"","float","col_w50","");
258      else if(type=="W20") return Column(type,"w_20","",7,prVEL,"","float","col_w20","");
259      else if(type=="WVEL") return Column(type,"w_VEL","",7,prVEL,"","float","col_wvel","");
260      else if(type=="FINT") return Column(type,"F_int","",10,prFLUX,"phot.flux.density.integrated","float","col_fint","");
261      else if(type=="FINTERR") return Column(type,"eF_int","",10,prFLUX,"phot.flux.density.integrated;stat.err","float","col_efint","");
262      else if(type=="FTOT") return Column(type,"F_tot","",10,prFLUX,"phot.flux.density","float","col_ftot","");
263      else if(type=="FTOTERR") return Column(type,"eF_tot","",10,prFLUX,"phot.flux.density;stat.err","float","col_eftot","");
264      else if(type=="FPEAK") return Column(type,"F_peak","",9,prFLUX,"phot.flux;stat.max","float","col_fpeak","");
265      else if(type=="SNRPEAK") return Column(type,"S/Nmax","",7,prSNR,"stat.snr;phot.flux","float","col_snrmax","");
266      else if(type=="X1") return Column(type,"X1","",4,0,"pos.cartesian.x;stat.min","int","col_x1","");
267      else if(type=="Y1") return Column(type,"Y1","",4,0,"pos.cartesian.y;stat.min","int","col_y1","");
268      else if(type=="Z1") return Column(type,"Z1","",4,0,"pos.cartesian.z;stat.min","int","col_z1","");
269      else if(type=="X2") return Column(type,"X2","",4,0,"pos.cartesian.x;stat.max","int","col_x2","");
270      else if(type=="Y2") return Column(type,"Y2","",4,0,"pos.cartesian.y;stat.max","int","col_y2","");
271      else if(type=="Z2") return Column(type,"Z2","",4,0,"pos.cartesian.z;stat.max","int","col_z2","");
272      else if(type=="NPIX") return Column(type,"Npix","[pix]",6,0,"","int","col_npix","");
273      else if(type=="FLAG") return Column(type,"Flag","",5,0,"meta.code.qual","char","col_flag","");
274      else if(type=="XAV") return Column(type,"X_av","",6,prXYZ,"pos.cartesian.x;stat.mean","float","col_xav","");
275      else if(type=="YAV") return Column(type,"Y_av","",6,prXYZ,"pos.cartesian.y;stat.mean","float","col_yav","");
276      else if(type=="ZAV") return Column(type,"Z_av","",6,prXYZ,"pos.cartesian.z;stat.mean","float","col_zav","");
277      else if(type=="XCENT") return Column(type,"X_cent","",7,prXYZ,"pos.cartesian.x;stat.centroid","float","col_xcent","");
278      else if(type=="YCENT") return Column(type,"Y_cent","",7,prXYZ,"pos.cartesian.y;stat.centroid","float","col_ycent","");
279      else if(type=="ZCENT") return Column(type,"Z_cent","",7,prXYZ,"pos.cartesian.z;stat.centroid","float","col_zcent","");
280      else if(type=="XPEAK") return Column(type,"X_peak","",7,prXYZ,"pos.cartesian.x;phot.flux;stat.max","int","col_xpeak","");
281      else if(type=="YPEAK") return Column(type,"Y_peak","",7,prXYZ,"pos.cartesian.y;phot.flux;stat.max","int","col_ypeak","");
282      else if(type=="ZPEAK") return Column(type,"Z_peak","",7,prXYZ,"pos.cartesian.z;phot.flux;stat.max","int","col_zpeak","");
283      else if(type=="NUMCH") return Column(type,"Nch","",6,0,"em.bin;stat.sum","int","col_nch","");
284      else if(type=="SPATSIZE") return Column(type,"Sp_size","",8,0,"instr.pixel;stat.sum","int","col_spsize","");
285      else {
286        Column col;
287        col.setType(type);
288        return col;
289      }
290
291    }
292
293    CatalogueSpecification getFullColSet(std::vector<Detection> &objectList, FitsHeader &head)
294    {
295      ///  @details A function that returns a catalogue specification
296      ///  containing information on the columns necessary for output
297      ///  to the results file:
298      ///  Obj#,NAME,X,Y,Z,RA,DEC,VEL,w_RA,w_DEC,w_VEL,F_tot,F_int,F_peak,
299      ///  X1,X2,Y1,Y2,Z1,Z2,Npix,Flag,
300      ///  XAV,YAV,ZAV,XCENT,YCENT,ZCENT,XPEAK,YPEAK,ZPEAK
301      ///
302      ///   Each object in the provided objectList is checked to see if it
303      ///   requires any column to be widened, or for that column to have
304      ///   its precision increased.
305      ///
306      ///   Both Ftot and Fint are provided -- it is up to the calling
307      ///   function to determine which to use.
308      ///
309      /// \param objectList A std::vector list of Detection objects that the
310      /// columns need to fit.
311      /// \param head The FitsHeader object defining the World Coordinate
312      /// System.
313      /// \return A CatalogueSpecification
314
315      CatalogueSpecification newset;
316
317      // desired precisions for fluxes, velocities and SNR value
318      int precVel,precFlux,precSNR;
319      if(objectList.size()>0){
320        precVel=objectList[0].getVelPrec();
321        precFlux=objectList[0].getFpeakPrec(); // same as FintPrec at this point.
322        precSNR=objectList[0].getSNRPrec();
323      }
324      else {
325        precVel = prVEL;
326        precFlux = prFLUX;
327        precSNR = prSNR;
328      }
329
330      // set up the default columns
331      newset.addColumn( Column("NUM") );
332      newset.addColumn( Column("NAME") );
333      newset.addColumn( Column("X") );
334      newset.addColumn( Column("Y") );
335      newset.addColumn( Column("Z") );
336      newset.addColumn( Column("RA") );
337      newset.addColumn( Column("DEC") );
338      newset.addColumn( Column("RAJD") );
339      newset.addColumn( Column("DECJD") );
340      newset.addColumn( Column("VEL") );
341      newset.addColumn( Column("MAJ") );
342      newset.addColumn( Column("MIN") );
343      newset.addColumn( Column("PA") );
344      newset.addColumn( Column("WRA") );
345      newset.addColumn( Column("WDEC") );
346      newset.addColumn( Column("W50") );
347      newset.addColumn( Column("W20") );
348      newset.addColumn( Column("WVEL") );
349      newset.addColumn( Column("FINT") );
350      newset.addColumn( Column("FINTERR") );
351      newset.addColumn( Column("FTOT") );
352      newset.addColumn( Column("FTOTERR") );
353      newset.addColumn( Column("FPEAK") );
354      newset.addColumn( Column("SNRPEAK") );
355      newset.addColumn( Column("X1") );
356      newset.addColumn( Column("X2") );
357      newset.addColumn( Column("Y1") );
358      newset.addColumn( Column("Y2") );
359      newset.addColumn( Column("Z1") );
360      newset.addColumn( Column("Z2") );
361      newset.addColumn( Column("NPIX") );
362      newset.addColumn( Column("FLAG") );
363      newset.addColumn( Column("XAV") );
364      newset.addColumn( Column("YAV") );
365      newset.addColumn( Column("ZAV") );
366      newset.addColumn( Column("XCENT") );
367      newset.addColumn( Column("YCENT") );
368      newset.addColumn( Column("ZCENT") );
369      newset.addColumn( Column("XPEAK") );
370      newset.addColumn( Column("YPEAK") );
371      newset.addColumn( Column("ZPEAK") );
372      newset.addColumn( Column("NUMCH") );
373      newset.addColumn( Column("SPATSIZE") );
374     
375      // Define the column names and units where not predifined by the
376      // default settings (ie. for those columns that depend on the
377      // WCS or image units)
378      if(head.isWCS()){
379          newset.column("RA").setName(head.lngtype());
380          newset.column("DEC").setName(head.lattype());
381          newset.column("RAJD").setName(head.lngtype());
382          newset.column("DECJD").setName(head.lattype());
383          if(head.canUseThirdAxis()){
384              if(head.WCS().spec < 0)  // if it's not a spectral axis
385                  newset.column("VEL").setName( head.WCS().ctype[2] );
386              else
387                  newset.column("VEL").setName(head.getSpectralType());
388              if(head.getSpectralUnits().size()>0)
389                  newset.column("VEL").setUnits("[" + head.getSpectralUnits() + "]");
390          }
391          newset.column("MAJ").setUnits("["+head.getShapeUnits()+"]");
392          newset.column("MIN").setUnits("["+head.getShapeUnits()+"]");
393          newset.column("WRA").setName("w_"+head.lngtype());
394          newset.column("WDEC").setName("w_"+head.lattype());
395          if(head.canUseThirdAxis()){
396              if(head.getSpectralUnits().size()>0){
397                  newset.column("W50").setUnits("[" + head.getSpectralUnits() + "]");
398                  newset.column("W20").setUnits("[" + head.getSpectralUnits() + "]");
399                  newset.column("WVEL").setUnits("[" + head.getSpectralUnits() + "]");
400              }
401              if(head.WCS().spec < 0) // if it's not a spectral axis
402                  newset.column("WVEL").setName( std::string("w_") + head.WCS().ctype[2] );
403              else
404                  newset.column("WVEL").setName(std::string("w_")+head.getSpectralType());
405          }
406      }
407      if(head.getIntFluxUnits().size()>0){
408          newset.column("FINT").setUnits("[" + head.getIntFluxUnits() + "]");
409          newset.column("FINTERR").setUnits("[" + head.getIntFluxUnits() + "]");
410      }
411      newset.column("FTOT").setUnits("[" + head.getFluxUnits() + "]");
412      newset.column("FTOTERR").setUnits("[" + head.getFluxUnits() + "]");
413      newset.column("FPEAK").setUnits("[" + head.getFluxUnits() + "]");
414     
415
416      // Now test each object against each new column, ensuring each
417      // column has sufficient width and (in most cases) precision to
418      // accomodate the data.
419      std::vector<Detection>::iterator obj;
420      for(obj = objectList.begin(); obj < objectList.end(); obj++){
421        std::string tempstr;
422        int tempwidth;
423        float val,minval;
424        double valD,minvalD;
425
426        newset.column("NUM").check(obj->getID());
427        newset.column("NAME").check(obj->getName());
428        newset.column("X").check(obj->getXcentre()+obj->getXOffset());
429        newset.column("Y").check(obj->getYcentre()+obj->getYOffset());
430        newset.column("Z").check(obj->getZcentre()+obj->getZOffset());
431        if(head.isWCS()){
432            newset.column("RA").check(obj->getRAs());
433            newset.column("DEC").check(obj->getDecs());
434            newset.column("RAJD").check(obj->getRA());
435            newset.column("DECJD").check(obj->getDec());
436            if(head.canUseThirdAxis()){
437                newset.column("VEL").check(obj->getVel());
438            }
439            newset.column("MAJ").check(obj->getMajorAxis());
440            newset.column("MIN").check(obj->getMinorAxis());
441            // For the PA column, we don't increase the precision. If
442            // something is very close to zero position angle, then
443            // we're happy to call it zero.
444            newset.column("PA").check(obj->getPositionAngle(),false);
445            newset.column("WRA").check(obj->getRAWidth());
446            newset.column("WDEC").check(obj->getDecWidth());
447            if(head.canUseThirdAxis()){
448                newset.column("W50").check(obj->getW50());
449                newset.column("W20").check(obj->getW20());
450                newset.column("WVEL").check(obj->getVelWidth());
451            }
452           
453            newset.column("FINT").check(obj->getIntegFlux());
454            if(obj->getIntegFluxError()>0.)
455                newset.column("FINTERR").check(obj->getIntegFluxError());
456        }
457        newset.column("FTOT").check(obj->getTotalFlux());
458        if(obj->getTotalFluxError()>0.)
459            newset.column("FTOTERR").check(obj->getTotalFluxError());
460        newset.column("FPEAK").check(obj->getPeakFlux());
461        if(obj->getPeakSNR()>0.)
462            newset.column("SNRPEAK").check(obj->getPeakSNR());
463        newset.column("X1").check(obj->getXmin()+obj->getXOffset());
464        newset.column("X2").check(obj->getXmax()+obj->getXOffset());
465        newset.column("Y1").check(obj->getYmin()+obj->getYOffset());
466        newset.column("Y2").check(obj->getYmax()+obj->getYOffset());
467        newset.column("Z1").check(obj->getZmin()+obj->getZOffset());
468        newset.column("Z2").check(obj->getZmax()+obj->getZOffset());
469        newset.column("NPIX").check(obj->getSize());
470        newset.column("XAV").check(obj->getXaverage()+obj->getXOffset());
471        newset.column("YAV").check(obj->getYaverage()+obj->getYOffset());
472        newset.column("ZAV").check(obj->getZaverage()+obj->getZOffset());
473        newset.column("XCENTROID").check(obj->getXCentroid()+obj->getXOffset());
474        newset.column("YCENTROID").check(obj->getYCentroid()+obj->getYOffset());
475        newset.column("ZCENTROID").check(obj->getZCentroid()+obj->getZOffset());
476        newset.column("XPEAK").check(obj->getXPeak()+obj->getXOffset());
477        newset.column("YPEAK").check(obj->getYPeak()+obj->getYOffset());
478        newset.column("ZPEAK").check(obj->getZPeak()+obj->getZOffset());
479        newset.column("NUMCH").check(obj->getMaxAdjacentChannels());
480        newset.column("SPATSIZE").check(obj->getSpatialSize());
481
482      }
483         
484      return newset;
485         
486    }
487
488  }
489
490}
Note: See TracBrowser for help on using the repository browser.