LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
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
 Estimate image backgrounds.
 
 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

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

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

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.