LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
meas_astrom
11.0-1-g60db491
include
lsst
meas
astrom
detail
utils.h
Go to the documentation of this file.
1
#if !defined(LSST_MEAS_ASTROM_UTILS_H)
2
#define LSST_MEAS_ASTROM_UTILS_H 1
3
4
#include <string>
5
#include <vector>
6
7
#include "
lsst/afw/table/Source.h
"
8
#include "
lsst/afw/coord.h
"
9
#include "
lsst/afw/geom.h
"
10
11
namespace
lsst {
12
namespace
meas {
13
namespace
astrom {
14
namespace
detail {
15
16
struct
MagColInfo
{
17
std::string
filterName
;
18
std::string
magCol
;
19
std::string
magErrCol
;
20
21
bool
hasErr
()
const
{
22
return
!
magErrCol
.empty();
23
}
24
};
25
26
31
struct
IndexManager
{
32
index_t*
index
;
33
IndexManager
(index_t* ind) :
index
(ind) {}
34
~IndexManager
() {
35
// Change once astrometry.net-0.40+ is in...
36
/*
37
if (index_close_fds(ind)) {
38
throw LSST_EXCEPT(lsst::pex::exceptions::IoError,
39
"Failed to index_close_fds() an astrometry_net_data file");
40
}
41
*/
42
if
(
index
->quads &&
index
->quads->fb &&
index
->quads->fb->fid) {
43
_close
(
index
->quads->fb->fid);
44
}
45
if
(
index
->codekd &&
index
->codekd->tree &&
index
->codekd->tree->io) {
46
_close
(
index
->codekd->tree->io);
47
}
48
if
(
index
->starkd &&
index
->starkd->tree &&
index
->starkd->tree->io) {
49
_close
(
index
->starkd->tree->io);
50
}
51
}
52
void
_close
(FILE* & fid) {
53
if
(fid) {
54
if
(fclose(fid)) {
55
std::cerr <<
"Error closing an astrometry_net_data quadfile"
<< std::endl;
56
}
57
fid = NULL;
58
}
59
}
60
void
_close
(
void
* io) {
61
_close
(reinterpret_cast<kdtree_fits_t*>(io)->fid);
62
}
63
};
64
89
lsst::afw::table::SimpleCatalog
90
getCatalogImpl
(
91
std::vector<index_t*> inds,
92
lsst::afw::coord::Coord
const
&ctrCoord,
93
lsst::afw::geom::Angle
const
&radius,
94
const
char
* idCol,
95
std::vector<MagColInfo>
const
& magColInfoList,
96
const
char
* starGalCol,
97
const
char
* varCol,
98
bool
uniqueIds=
true
);
99
100
}}}}
101
#endif
lsst::meas.astrom::detail::IndexManager::_close
void _close(FILE *&fid)
Definition:
utils.h:52
geom.h
An include file to include the header files for lsst::afw::geom.
lsst::meas.astrom::detail::IndexManager::IndexManager
IndexManager(index_t *ind)
Definition:
utils.h:33
coord.h
An include file to include the header files for lsst::afw::coord.
lsst::meas.astrom::detail::IndexManager::_close
void _close(void *io)
Definition:
utils.h:60
lsst::meas.astrom::detail::IndexManager::~IndexManager
~IndexManager()
Definition:
utils.h:34
Source.h
lsst::meas.astrom::detail::MagColInfo::magErrCol
std::string magErrCol
name of magnitude sigma column
Definition:
utils.h:19
lsst::meas.astrom::detail::MagColInfo::magCol
std::string magCol
name of magnitude column
Definition:
utils.h:18
lsst::meas.astrom::detail::MagColInfo::hasErr
bool hasErr() const
Definition:
utils.h:21
lsst::afw::geom::Angle
Definition:
Angle.h:104
lsst::afw::table::SortedCatalogT
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Definition:
fwd.h:55
lsst::meas.astrom::detail::getCatalogImpl
afwTable::SimpleCatalog getCatalogImpl(std::vector< index_t * > inds, lsst::afw::coord::Coord const &ctrCoord, lsst::afw::geom::Angle const &radius, char const *idCol, std::vector< MagColInfo > const &magColInfoList, char const *isStarCol, char const *isVarCol, bool uniqueIds)
Definition:
utils.cc:58
lsst::meas.astrom::detail::MagColInfo
Definition:
utils.h:16
lsst::meas.astrom::detail::IndexManager::index
index_t * index
Definition:
utils.h:32
lsst::meas.astrom::detail::MagColInfo::filterName
std::string filterName
name of filter
Definition:
utils.h:17
lsst::meas.astrom::detail::IndexManager
Definition:
utils.h:31
lsst::afw::coord::Coord
Definition:
Coord.h:69
Generated on Thu Sep 24 2015 02:29:21 for LSSTApplications by
1.8.5