LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
CatalogControl.cc
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 
3 /*
4  * LSST Data Management System
5  * Copyright 2012 LSST Corporation.
6  *
7  * This product includes software developed by the
8  * LSST Project (http://www.lsst.org/).
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the LSST License Statement and
21  * the GNU General Public License along with this program. If not,
22  * see <http://www.lsstcorp.org/LegalNotices/>.
23  */
24 
29 
30 #include <limits>
31 
32 #include "lsst/pex/exceptions.h"
33 #include "lsst/utils/ieee.h"
34 
35 
36 using std::numeric_limits;
37 using std::string;
38 using std::vector;
39 using lsst::pex::exceptions::InvalidParameterError;
40 
41 namespace lsst { namespace ap { namespace match {
42 
44  minEpoch(numeric_limits<double>::quiet_NaN()),
45  maxEpoch(numeric_limits<double>::quiet_NaN()),
46  maxParallax(numeric_limits<double>::quiet_NaN()),
47  maxAngularVelocity(numeric_limits<double>::quiet_NaN()),
48  fieldNames(),
49  outputFields(),
50  idColumn("id"),
51  epochColumn("epoch"),
52  epoch(51544.5), // J2000.0 MJD
53  raColumn("ra"),
54  raScale(0.0174532925199432957692369076849), // rad / deg
55  declColumn("decl"),
56  declScale(0.0174532925199432957692369076849), // rad / deg
57  muRaColumn("muRa"),
58  muRaScale(1.32734751843815467101961424328e-11), // (rad / (Julian day)) / (milliarcsec / (Julian yr))
59  muRaTrueAngle(true),
60  muDeclColumn("muDecl"),
61  muDeclScale(1.32734751843815467101961424328e-11), // (rad / (Julian day)) / (milliarcsec / (Julian yr))
62  parallaxColumn("parallax"),
63  parallaxScale(4.84813681109535993589914102357e-9), // rad / milliarcsec
64  vRadialColumn("vRad"),
65  vRadialScale(0.000577548327363993690854050371186) // (AU / day) / (km / s)
66 {
67  outputFields.push_back(string("*"));
68 }
69 
71 
74  throw LSST_EXCEPT(InvalidParameterError,
75  "Infinite catalog minEpoch and/or maxEpoch");
76  }
78  throw LSST_EXCEPT(InvalidParameterError,
79  "Infinite catalog maxParallax");
80  }
82  throw LSST_EXCEPT(InvalidParameterError,
83  "Infinite catalog maxAngularVelocity");
84  }
86  throw LSST_EXCEPT(InvalidParameterError,
87  "Catalog default epoch is not finite");
88  }
90  throw LSST_EXCEPT(InvalidParameterError,
91  "Catalog raScale and/or declScale (converts from catalog units "
92  "to radians) is not finite");
93  }
96  throw LSST_EXCEPT(InvalidParameterError,
97  "Catalog muRaScale and/or muDeclScale (converts from catalog "
98  "units to radians per Julian day) is not finite");
99  }
101  throw LSST_EXCEPT(InvalidParameterError,
102  "Catalog parallaxScale (converts from catalog units to radians) "
103  "is not finite");
104  }
106  throw LSST_EXCEPT(InvalidParameterError,
107  "Catalog vRadialScale (converts from catalog units to AU per day) "
108  "is not finite");
109  }
110 }
111 
112 }}} // namespace lsst::ap::match
113 
double declScale
&quot;Scaling factor to apply to decl column values on reading - must\n&quot; &quot;convert from catalog units to ra...
double minEpoch
&quot;Minimum epoch of catalog positions, MJD. If set to NaN, the actual\n&quot; &quot;value will be computed (if re...
double muRaScale
&quot;Scaling factor to apply to muRa column values on reading - must\n&quot; &quot;convert from catalog units to ra...
std::vector< std::string > outputFields
&quot;An array of names identifying the catalog fields (columns) to preserve\n&quot; &quot;in output tables...
int isinf(T t)
Definition: ieee.h:105
double parallaxScale
&quot;Scaling factor to apply to parallax column values on reading - must\n&quot; &quot;convert from catalog units t...
double raScale
&quot;Scaling factor to apply to ra column values on reading - must convert\n&quot; &quot;from catalog units to radi...
double vRadialScale
&quot;Scaling factor to apply to vRadial column values on reading - must\n&quot; &quot;convert from catalog units to...
Config parameters for catalogs involved in reference matching.
double maxEpoch
&quot;Maximum epoch of catalog positions, MJD. If set to NaN, the actual\n&quot; &quot;value will be computed (if re...
int isfinite(T t)
Definition: ieee.h:100
double muDeclScale
&quot;Scaling factor to apply to muDecl column values on reading - must\n&quot; &quot;convert from catalog units to ...
double maxParallax
&quot;Maximum parallax (milliarcsec) of any catalog entry. If catalog\n&quot; &quot;entries have no associated paral...
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
double epoch
&quot;Epoch to assign to catalog entries if the catalog has no epoch\n&quot; &quot;columns; MJD.\n&quot; ; ...
double maxAngularVelocity
&quot;Maximum angular velocity (milliarcsec/yr) of any catalog entry. If\n&quot; &quot;catalog entries have no assoc...
Include files required for standard LSST Exception handling.