1 #include "boost/format.hpp" 3 #include "lsst/meas/extensions/psfex/Field.hh" 15 int next, contextstruct *context)
22 setstruct *completeSet =
reinterpret_cast<setstruct *
>(filenames[catindex + 0]);
26 setstruct *
set = init_set(context);
27 set->fwhm = completeSet->fwhm;
28 for (
int i = 0; i != completeSet->vigdim; ++i) {
29 set->vigsize[i] = completeSet->vigsize[i];
31 for (
int i = 0; i != completeSet->ncontext; ++i) {
32 strcpy(
set->contextname[i], completeSet->contextname[i]);
33 set->contextoffset[i] = completeSet->contextoffset[i];
34 set->contextscale[i] = completeSet->contextscale[i];
40 for (
int i = 0; i != ncat; ++i) {
41 setstruct *
s =
reinterpret_cast<setstruct *
>(filenames[catindex + i]);
42 for (
int j = 0; j != completeSet->nsample; ++j) {
43 samplestruct
const *samp = s->sample[j];
44 if (ext == ALL_EXTENSIONS || ext == samp->extindex) {
50 set->samples_owner = 0;
51 malloc_samples(
set, nsample_keep);
52 for (
int i = 0; i != ncat; ++i) {
53 setstruct *
s =
reinterpret_cast<setstruct *
>(filenames[catindex + i]);
54 for (
int j = 0; j != completeSet->nsample; ++j) {
55 samplestruct *samp = s->sample[j];
56 if (ext == ALL_EXTENSIONS || ext == samp->extindex) {
57 set->sample[
set->nsample++] = samp;
69 namespace lsst {
namespace meas {
namespace extensions {
namespace psfex {
76 if (sets.size() > MAXFILE) {
82 for (
unsigned int i = 0; i != fields.size(); ++i) {
83 fields[i] = fields_[i]->impl;
94 size_t const setsSize;
96 ncat(
prefs.ncat), incat_name(ncat), setsSize(sets.size())
98 for (
int i = 0; i !=
prefs.ncat; ++i) {
99 incat_name[i] =
prefs.incat_name[i];
101 for (
unsigned int i = 0; i != sets.size(); ++i) {
102 prefs.incat_name[i] =
reinterpret_cast<char *
>(sets[i]->impl);
104 prefs.ncat = setsSize;
107 for (
int i = 0; i !=
prefs.ncat; ++i) {
108 prefs.incat_name[i] = incat_name[i];
110 for (
size_t i =
prefs.ncat; i < setsSize; ++i) {
111 prefs.incat_name[i] = NULL;
118 contextstruct *context = NULL, *fullcontext = NULL;
120 ScribbleRaii scribble(sets);
121 makeit_body(&fields[0], &context, &fullcontext,
false);
125 context_end(fullcontext);
127 context_end(context);
setstruct * load_samples(char **filenames, int catindex, int ncat, int ext, int next, contextstruct *context)
Reports attempts to exceed implementation-defined length limits for some classes. ...
daf::base::PropertySet * set
A base class for image defects.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
void makeit(std::vector< std::shared_ptr< Field > > &fields_, std::vector< std::shared_ptr< Set > > const &sets)