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
Namespaces | Macros | Functions
SourceCluster.cc File Reference

Source cluster table and record class implementation. More...

#include "lsst/ap/cluster/SourceCluster.h"
#include <boost/algorithm/string/case_conv.hpp>

Go to the source code of this file.

Namespaces

 lsst
 < multiple inclusion guard macro
 
 lsst::ap
 
 lsst::ap::cluster
 

Macros

#define SAVE_SLOT(NAME, Name)
 
#define SAVE_FILTER_SLOT(FILTER, filter, NAME, Name)
 
#define SAVE_COMPOUND_SLOT(FILTER, filter, NAME, Name)
 
#define LOAD_SLOT(NAME, Name)
 
#define LOAD_FILTER_SLOT(FILTER, filter, NAME, Name)
 
#define LOAD_COMPOUND_SLOT(FILTER, filter, NAME, Name)
 

Functions

KeyTuple< lsst::afw::table::Shapelsst::ap::cluster::addShapeFields (lsst::afw::table::Schema &schema, std::string const &filter, std::string const &name, std::string const &doc)
 Convenience function to setup fields for shapes. More...
 
KeyTuple< lsst::afw::table::Fluxlsst::ap::cluster::addFluxFields (lsst::afw::table::Schema &schema, std::string const &filter, std::string const &name, std::string const &doc, std::string const &unit)
 Convenience function to setup fields for fluxes. More...
 

Detailed Description

Source cluster table and record class implementation.

Author
Serge Monkewitz

Definition in file SourceCluster.cc.

Macro Definition Documentation

#define LOAD_COMPOUND_SLOT (   FILTER,
  filter,
  NAME,
  Name 
)
Value:
{ \
_fits->behavior &= ~lsst::afw::fits::Fits::AUTO_CHECK; \
std::string s, sErr, sCount; \
_fits->readKey(FILTER + "_" #NAME "_SLOT", s); \
_fits->readKey(FILTER + "_" #NAME "_ERR_SLOT", sErr); \
_fits->readKey(FILTER + "_" #NAME "_COUNT_SLOT", sCount); \
if (_fits->status == 0) { \
metadata->remove(FILTER + "_" #NAME "_SLOT"); \
metadata->remove(FILTER + "_" #NAME "_ERR_SLOT"); \
metadata->remove(FILTER + "_" #NAME "_COUNT_SLOT"); \
std::replace(s.begin(), s.end(), '_', '.'); \
std::replace(sErr.begin(), sErr.end(), '_', '.'); \
std::replace(sCount.begin(), sCount.end(), '_', '.'); \
table->define ## Name (filter, schema[s], schema[sErr], schema[sCount]); \
} else { \
_fits->status = 0; \
} \
_fits->behavior |= lsst::afw::fits::Fits::AUTO_CHECK; \
}
tbl::Schema schema
Definition: CoaddPsf.cc:324
if(width!=gim.getWidth()||height!=gim.getHeight()||x0!=gim.getX0()||y0!=gim.getY0())
Definition: saturated.cc:47

Definition at line 88 of file SourceCluster.cc.

#define LOAD_FILTER_SLOT (   FILTER,
  filter,
  NAME,
  Name 
)
Value:
{ \
_fits->behavior &= ~lsst::afw::fits::Fits::AUTO_CHECK; \
std::string s; \
_fits->readKey(FILTER + "_" #NAME "_SLOT", s); \
if (_fits->status == 0) { \
metadata->remove(FILTER + "_" #NAME "_SLOT"); \
std::replace(s.begin(), s.end(), '_', '.'); \
table->define ## Name (filter, schema[s]); \
} else { \
_fits->status = 0; \
} \
_fits->behavior |= lsst::afw::fits::Fits::AUTO_CHECK; \
}
tbl::Schema schema
Definition: CoaddPsf.cc:324
if(width!=gim.getWidth()||height!=gim.getHeight()||x0!=gim.getX0()||y0!=gim.getY0())
Definition: saturated.cc:47

Definition at line 73 of file SourceCluster.cc.

#define LOAD_SLOT (   NAME,
  Name 
)
Value:
{ \
_fits->behavior &= ~lsst::afw::fits::Fits::AUTO_CHECK; \
std::string s; \
_fits->readKey(#NAME "_SLOT", s); \
if (_fits->status == 0) { \
metadata->remove(#NAME "_SLOT"); \
std::replace(s.begin(), s.end(), '_', '.'); \
table->define ## Name (schema[s]); \
} else { \
_fits->status = 0; \
} \
_fits->behavior |= lsst::afw::fits::Fits::AUTO_CHECK; \
}
tbl::Schema schema
Definition: CoaddPsf.cc:324
if(width!=gim.getWidth()||height!=gim.getHeight()||x0!=gim.getX0()||y0!=gim.getY0())
Definition: saturated.cc:47

Definition at line 58 of file SourceCluster.cc.

#define SAVE_COMPOUND_SLOT (   FILTER,
  filter,
  NAME,
  Name 
)
Value:
SAVE_FILTER_SLOT(FILTER, filter, NAME, Name) \
SAVE_FILTER_SLOT(FILTER, filter, NAME ## _ERR, Name ## Err) \
SAVE_FILTER_SLOT(FILTER, filter, NAME ## _COUNT, Name ## Count)
#define SAVE_FILTER_SLOT(FILTER, filter, NAME, Name)

Definition at line 53 of file SourceCluster.cc.

#define SAVE_FILTER_SLOT (   FILTER,
  filter,
  NAME,
  Name 
)
Value:
if (table->get ## Name ## Key(filter).isValid()) { \
std::string s = table->getSchema().find(table->get ## Name ## Key(filter)).field.getName(); \
std::replace(s.begin(), s.end(), '.', '_'); \
_fits->writeKey(FILTER + "_" #NAME "_SLOT", s.c_str(), \
"Defines the " #Name " slot in the " + filter + " filter"); \
}

Definition at line 45 of file SourceCluster.cc.

#define SAVE_SLOT (   NAME,
  Name 
)
Value:
if (table->get ## Name ## Key().isValid()) { \
std::string s = table->getSchema().find(table->get ## Name ## Key()).field.getName(); \
std::replace(s.begin(), s.end(), '.', '_'); \
_fits->writeKey(#NAME "_SLOT", s.c_str(), "Defines the " #Name " slot"); \
}

Definition at line 38 of file SourceCluster.cc.