LSSTApplications  19.0.0-10-g4a5fae6+3,19.0.0-10-g920eed2,19.0.0-11-g48a0200+2,19.0.0-18-gfc4e62b+16,19.0.0-2-g3b2f90d+2,19.0.0-2-gd671419+6,19.0.0-20-g5a5a17ab+14,19.0.0-21-g2644856+17,19.0.0-24-g0913cb1,19.0.0-24-g878c510+4,19.0.0-25-g6c8df7140+1,19.0.0-25-gb330496+4,19.0.0-3-g2b32d65+6,19.0.0-3-g8227491+15,19.0.0-3-g9c54d0d+15,19.0.0-3-gca68e65+11,19.0.0-3-gcfc5f51+6,19.0.0-3-ge110943+14,19.0.0-3-ge74d124,19.0.0-30-g9c3fd16+5,19.0.0-4-g06f5963+6,19.0.0-4-g10df615,19.0.0-4-g3d16501+17,19.0.0-4-g4a9c019+6,19.0.0-4-g5a8b323,19.0.0-4-g66397f0+1,19.0.0-4-g8557e14,19.0.0-4-g8964aba+16,19.0.0-4-ge404a01+15,19.0.0-5-g40f3a5a,19.0.0-5-g4db63b3,19.0.0-5-gb9eeb60,19.0.0-5-gfb03ce7+16,19.0.0-6-gbaebbfb+15,19.0.0-61-gec4c6e08+5,19.0.0-7-g039c0b5+15,19.0.0-7-gbea9075+4,19.0.0-7-gc567de5+16,19.0.0-72-g37abf38+2,19.0.0-9-g463f923+15,v20.0.0.rc1
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
lsst::afw::table::Schema Class Referencefinal

Defines the fields and offsets for a table. More...

#include <Schema.h>

Public Types

enum  ComparisonFlags {
  EQUAL_KEYS = 0x01, EQUAL_NAMES = 0x02, EQUAL_DOCS = 0x04, EQUAL_UNITS = 0x08,
  EQUAL_FIELDS = 0x0F, EQUAL_ALIASES = 0x10, IDENTICAL = 0x1F
}
 Bit flags used when comparing schemas. More...
 

Public Member Functions

std::string join (std::string const &a, std::string const &b) const
 Join strings using the field delimiter appropriate for this Schema. More...
 
std::string join (std::string const &a, std::string const &b, std::string const &c) const
 
std::string join (std::string const &a, std::string const &b, std::string const &c, std::string const &d) const
 
template<typename T >
SchemaItem< T > find (std::string const &name) const
 Find a SchemaItem in the Schema by name. More...
 
template<typename T >
SchemaItem< T > find (Key< T > const &key) const
 Find a SchemaItem in the Schema by key. More...
 
template<typename F >
void findAndApply (std::string const &name, F &&func) const
 Find a SchemaItem by name and run a functor on it. More...
 
SubSchema operator[] (std::string const &name) const
 Look up a (possibly incomplete) name in the Schema. More...
 
std::set< std::stringgetNames (bool topOnly=false) const
 Return a set of field names in the schema. More...
 
int getRecordSize () const
 Return the raw size of a record in bytes. More...
 
int getFieldCount () const
 The total number of fields. More...
 
int getFlagFieldCount () const
 The number of Flag fields. More...
 
int getNonFlagFieldCount () const
 The number of non-Flag fields. More...
 
template<typename T >
Key< T > addField (Field< T > const &field, bool doReplace=false)
 Add a new field to the Schema, and return the associated Key. More...
 
template<typename T >
Key< T > addField (std::string const &name, std::string const &doc, std::string const &units="", FieldBase< T > const &base=FieldBase< T >(), bool doReplace=false)
 Add a new field to the Schema, and return the associated Key. More...
 
template<typename T >
Key< T > addField (std::string const &name, std::string const &doc, FieldBase< T > const &base, bool doReplace=false)
 Add a new field to the Schema, and return the associated Key. More...
 
template<typename T >
void replaceField (Key< T > const &key, Field< T > const &field)
 Replace the Field (name/description) for an existing Key. More...
 
template<typename F >
void forEach (F &&func) const
 Apply a functor to each SchemaItem in the Schema. More...
 
bool operator== (Schema const &other) const
 Equality comparison. More...
 
bool operator!= (Schema const &other) const
 
std::size_t hash_value () const noexcept
 Return a hash of this object. More...
 
int compare (Schema const &other, int flags=EQUAL_KEYS) const
 Do a detailed equality comparison of two schemas. More...
 
int contains (Schema const &other, int flags=EQUAL_KEYS) const
 Test whether the given schema is a subset of this. More...
 
template<typename T >
int contains (SchemaItem< T > const &item, int flags=EQUAL_KEYS) const
 Return true if the given item is in this schema. More...
 
std::shared_ptr< AliasMapgetAliasMap () const
 Return the map of aliases. More...
 
void setAliasMap (std::shared_ptr< AliasMap > aliases)
 Set the alias map. More...
 
void disconnectAliases ()
 Sever the connection between this schema and any others with which it shares aliases. More...
 
 Schema ()
 Construct an empty Schema. More...
 
 Schema (Schema const &other)
 Copy constructor. More...
 
 Schema (Schema &&other)
 
Schemaoperator= (Schema const &other)
 
Schemaoperator= (Schema &&other)
 
 ~Schema ()
 

Static Public Member Functions

static Schema readFits (std::string const &filename, int hdu=fits::DEFAULT_HDU)
 Construct from reading a FITS file. More...
 
static Schema readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static Schema readFits (fits::Fits &fitsfile)
 
static Schema fromFitsMetadata (daf::base::PropertyList &header, bool stripMetadata=true)
 Construct from reading a FITS header. More...
 

Static Public Attributes

static int const VERSION = detail::SchemaImpl::VERSION
 

Friends

class detail::Access
 
class SubSchema
 
std::ostreamoperator<< (std::ostream &os, Schema const &schema)
 Stringification. More...
 

Detailed Description

Defines the fields and offsets for a table.

Schema behaves like a container of SchemaItem objects, mapping a descriptive Field object with the Key object used to access record and ColumnView values. A Schema is the most important ingredient in creating a table.

Because offsets for fields are assigned when the field is added to the Schema, Schemas do not support removing fields, though they do allow renaming.

Field names in Schemas are expected to be underscore-separated names (e.g. 'a_b_c', but see Field Names for the full conventions, including when to use underscores vs. CamelCase). The SubSchema class and Schema::operator[] provide a heirarchical interface to these names, but are implemented entirely as string splitting/joining operations that ultimately forward to member functions that operate on the fully-qualified field name, so there is no requirement that names be separated by underscores, and no performance advantage to using a SubSchema.

A SchemaMapper object can be used to define a relationship between two Schemas to be used when copying values from one table to another or loading/saving selected fields to disk.

Schema uses copy-on-write, and hence should always be held by value rather than smart pointer. When creating a Python interface, functions that return Schema by const reference should be converted to return by value (returnCopy) to ensure proper memory management and encapsulation.

Definition at line 50 of file Schema.h.

Member Enumeration Documentation

◆ ComparisonFlags

Bit flags used when comparing schemas.

All quantities are compared in insertion order, so if two schemas have the same fields added in opposite order, they will not be considered equal.

Enumerator
EQUAL_KEYS 

Keys have the same types offsets, and sizes.

EQUAL_NAMES 

Fields have the same names (ordered).

EQUAL_DOCS 

Fields have the same documentation (ordered).

EQUAL_UNITS 

Fields have the same units (ordered).

EQUAL_FIELDS 

Fields are identical (but aliases may not be).

EQUAL_ALIASES 

Schemas have identical AliasMaps.

IDENTICAL 

Everything is the same.

Definition at line 64 of file Schema.h.

64  {
65  EQUAL_KEYS = 0x01,
66  EQUAL_NAMES = 0x02,
67  EQUAL_DOCS = 0x04,
68  EQUAL_UNITS = 0x08,
69  EQUAL_FIELDS = 0x0F,
70  EQUAL_ALIASES = 0x10,
71  IDENTICAL = 0x1F
72  };

Constructor & Destructor Documentation

◆ Schema() [1/3]

lsst::afw::table::Schema::Schema ( )

Construct an empty Schema.

Definition at line 609 of file Schema.cc.

609 : _impl(std::make_shared<Impl>()), _aliases(std::make_shared<AliasMap>()) {}

◆ Schema() [2/3]

lsst::afw::table::Schema::Schema ( Schema const &  other)

Copy constructor.

Definition at line 611 of file Schema.cc.

611 : _impl(other._impl), _aliases(other._aliases) {}

◆ Schema() [3/3]

lsst::afw::table::Schema::Schema ( Schema &&  other)

Definition at line 613 of file Schema.cc.

613 : Schema(other) {}

◆ ~Schema()

lsst::afw::table::Schema::~Schema ( )
default

Member Function Documentation

◆ addField() [1/3]

template<typename T >
Key< T > lsst::afw::table::Schema::addField ( Field< T > const &  field,
bool  doReplace = false 
)

Add a new field to the Schema, and return the associated Key.

The offsets of fields are determined by the order they are added, but may be not contiguous (the Schema may add padding to align fields, and how much padding is considered an implementation detail).

If doReplace is true and the field exists, it will be replaced instead of throwing an exception.

Definition at line 668 of file Schema.cc.

668  {
669  _edit();
670  return _impl->addField(field, doReplace);
671 }

◆ addField() [2/3]

template<typename T >
Key<T> lsst::afw::table::Schema::addField ( std::string const &  name,
std::string const &  doc,
FieldBase< T > const &  base,
bool  doReplace = false 
)
inline

Add a new field to the Schema, and return the associated Key.

This is simply a convenience wrapper, equivalent to:

addField(Field<T>(name, doc, base), doReplace)

Definition at line 193 of file Schema.h.

194  {
195  return addField(Field<T>(name, doc, base), doReplace);
196  }

◆ addField() [3/3]

template<typename T >
Key<T> lsst::afw::table::Schema::addField ( std::string const &  name,
std::string const &  doc,
std::string const &  units = "",
FieldBase< T > const &  base = FieldBase<T>(),
bool  doReplace = false 
)
inline

Add a new field to the Schema, and return the associated Key.

This is simply a convenience wrapper, equivalent to:

addField(Field<T>(name, doc, units, base), doReplace)

Definition at line 180 of file Schema.h.

181  {
182  return addField(Field<T>(name, doc, units, base), doReplace);
183  }

◆ compare()

int lsst::afw::table::Schema::compare ( Schema const &  other,
int  flags = EQUAL_KEYS 
) const

Do a detailed equality comparison of two schemas.

See ComparisonFlags for a description of the possible return values

Parameters
[in]otherThe other schema to compare to.
[in]flagsWhich types of comparisions to perform. Flag bits not present here will never be returned.

Definition at line 698 of file Schema.cc.

698  {
699  int result = contains(other, flags);
700  if (_impl->getItems().size() != other._impl->getItems().size()) {
701  result &= ~EQUAL_FIELDS;
702  }
703  if (getAliasMap()->size() != other.getAliasMap()->size()) {
704  result &= ~EQUAL_ALIASES;
705  }
706  return result;
707 }

◆ contains() [1/2]

int lsst::afw::table::Schema::contains ( Schema const &  other,
int  flags = EQUAL_KEYS 
) const

Test whether the given schema is a subset of this.

This function behaves very similarly to compare(), but ignores fields that are present in this but absent in other.

Definition at line 679 of file Schema.cc.

679  {
680  if (_impl == other._impl) return flags;
681  if (_impl->getItems().size() < other._impl->getItems().size()) return 0;
682  int result = flags;
683  if (result & EQUAL_FIELDS) {
684  for (Impl::ItemContainer::const_iterator i1 = _impl->getItems().begin(),
685  i2 = other._impl->getItems().begin();
686  i2 != other._impl->getItems().end(); ++i1, ++i2) {
687  if ((result & EQUAL_KEYS) && !ItemFunctors::compareKeys(*i1, *i2)) result &= ~EQUAL_KEYS;
688  if ((result & EQUAL_NAMES) && !ItemFunctors::compareNames(*i1, *i2)) result &= ~EQUAL_NAMES;
689  if ((result & EQUAL_DOCS) && !ItemFunctors::compareDocs(*i1, *i2)) result &= ~EQUAL_DOCS;
690  if ((result & EQUAL_UNITS) && !ItemFunctors::compareUnits(*i1, *i2)) result &= ~EQUAL_UNITS;
691  if (!result) break;
692  }
693  }
694  if ((result & EQUAL_ALIASES) && !getAliasMap()->contains(*other.getAliasMap())) result &= ~EQUAL_ALIASES;
695  return result;
696 }

◆ contains() [2/2]

template<typename T >
int lsst::afw::table::Schema::contains ( SchemaItem< T > const &  item,
int  flags = EQUAL_KEYS 
) const

Return true if the given item is in this schema.

The flags must include the EQUAL_KEYS bit, and if the item cannot be found by key no bits will be set on return.

Definition at line 718 of file Schema.cc.

718  {
719  return _impl->contains(item, flags);
720 }

◆ disconnectAliases()

void lsst::afw::table::Schema::disconnectAliases ( )

Sever the connection between this schema and any others with which it shares aliases.

Definition at line 729 of file Schema.cc.

729 { _aliases = std::make_shared<AliasMap>(*_aliases); }

◆ find() [1/2]

template<typename T >
SchemaItem< T > lsst::afw::table::Schema::find ( Key< T > const &  key) const

Find a SchemaItem in the Schema by key.

Keys corresponding to named subfields are accepted, and will return a SchemaItem whose field is copied from the parent field with only the name changed. Keys corresponding to unnamed subfields (such as array elements) are not accepted.

Definition at line 663 of file Schema.cc.

663  {
664  return _impl->find(key);
665 }

◆ find() [2/2]

template<typename T >
SchemaItem< T > lsst::afw::table::Schema::find ( std::string const &  name) const

Find a SchemaItem in the Schema by name.

Names corresponding to named subfields are accepted, and will return a SchemaItem whose field is copied from the parent field with only the name changed.

Definition at line 656 of file Schema.cc.

656  {
657  std::string tmp(name);
658  _aliases->_apply(tmp);
659  return _impl->find<T>(tmp);
660 }

◆ findAndApply()

template<typename F >
void lsst::afw::table::Schema::findAndApply ( std::string const &  name,
F &&  func 
) const
inline

Find a SchemaItem by name and run a functor on it.

Names corresponding to named subfields are not accepted. The given functor must have an overloaded function call operator that accepts any SchemaItem type (the same as a functor provided to forEach).

Definition at line 116 of file Schema.h.

116  {
117  _impl->findAndApply(_aliases->apply(name), std::forward<F>(func));
118  }

◆ forEach()

template<typename F >
void lsst::afw::table::Schema::forEach ( F &&  func) const
inline

Apply a functor to each SchemaItem in the Schema.

The functor must have a templated or sufficiently overloaded operator() that supports SchemaItems of all supported field types - even those that are not present in this particular Schema.

Fields will be processed in the order they were added to the schema.

Definition at line 212 of file Schema.h.

212  {
213  Impl::VisitorWrapper<F> visitor(std::forward<F>(func));
214  std::for_each(_impl->getItems().begin(), _impl->getItems().end(), visitor);
215  }

◆ fromFitsMetadata()

Schema lsst::afw::table::Schema::fromFitsMetadata ( daf::base::PropertyList header,
bool  stripMetadata = true 
)
static

Construct from reading a FITS header.

If 'stripMetadata', then the header will be modified, removing the relevant keywords.

Definition at line 637 of file Schema.cc.

637  {
638  return io::FitsSchemaInputMapper(header, stripMetadata).finalize();
639 }

◆ getAliasMap()

std::shared_ptr<AliasMap> lsst::afw::table::Schema::getAliasMap ( ) const
inline

Return the map of aliases.

Note that while this is a const method, it does allow the Schema's aliases to be edited - this allows the aliases to be modified even after a Table has been constructed from the Schema.

See AliasMap for more information on schema aliases.

Definition at line 269 of file Schema.h.

269 { return _aliases; }

◆ getFieldCount()

int lsst::afw::table::Schema::getFieldCount ( ) const
inline

The total number of fields.

Definition at line 151 of file Schema.h.

151 { return _impl->getFieldCount(); }

◆ getFlagFieldCount()

int lsst::afw::table::Schema::getFlagFieldCount ( ) const
inline

The number of Flag fields.

Definition at line 154 of file Schema.h.

154 { return _impl->getFlagFieldCount(); }

◆ getNames()

std::set< std::string > lsst::afw::table::Schema::getNames ( bool  topOnly = false) const

Return a set of field names in the schema.

If topOnly==true, return a unique list of only the part of the names before the first underscore. For example, if the full list of field names is ['a_b_c', 'a_d', 'e_f'], topOnly==true will return ['a', 'e'].

Returns an instance of Python's builtin set in Python.

Aliases are not returned.

Definition at line 653 of file Schema.cc.

653 { return _impl->getNames(topOnly); }

◆ getNonFlagFieldCount()

int lsst::afw::table::Schema::getNonFlagFieldCount ( ) const
inline

The number of non-Flag fields.

Definition at line 157 of file Schema.h.

157 { return _impl->getNonFlagFieldCount(); }

◆ getRecordSize()

int lsst::afw::table::Schema::getRecordSize ( ) const
inline

Return the raw size of a record in bytes.

Definition at line 148 of file Schema.h.

148 { return _impl->getRecordSize(); }

◆ hash_value()

std::size_t lsst::afw::table::Schema::hash_value ( ) const
noexcept

Return a hash of this object.

Definition at line 709 of file Schema.cc.

709  {
710  // Completely arbitrary seed
711  std::size_t result = 17;
712  auto hasher = [&result](auto const &item) { result = utils::hashCombine(result, item.key); };
713  forEach(hasher);
714  return result;
715 }

◆ join() [1/3]

std::string lsst::afw::table::Schema::join ( std::string const &  a,
std::string const &  b 
) const

Join strings using the field delimiter appropriate for this Schema.

Definition at line 641 of file Schema.cc.

641  {
642  // delegate to utility funcs at top of this file
643  return afw::table::join(a, b, getDelimiter());
644 }

◆ join() [2/3]

std::string lsst::afw::table::Schema::join ( std::string const &  a,
std::string const &  b,
std::string const &  c 
) const
inline

Definition at line 77 of file Schema.h.

77  {
78  return join(join(a, b), c);
79  }

◆ join() [3/3]

std::string lsst::afw::table::Schema::join ( std::string const &  a,
std::string const &  b,
std::string const &  c,
std::string const &  d 
) const
inline

Definition at line 80 of file Schema.h.

81  {
82  return join(join(a, b), join(c, d));
83  }

◆ operator!=()

bool lsst::afw::table::Schema::operator!= ( Schema const &  other) const
inline

Definition at line 226 of file Schema.h.

226 { return !this->operator==(other); }

◆ operator=() [1/2]

Schema & lsst::afw::table::Schema::operator= ( Schema &&  other)
default

◆ operator=() [2/2]

Schema & lsst::afw::table::Schema::operator= ( Schema const &  other)
default

◆ operator==()

bool lsst::afw::table::Schema::operator== ( Schema const &  other) const
inline

Equality comparison.

Schemas are considered equal according the standard equality operator if their sequence of keys are identical (same types with the same offsets); names and descriptions of fields are not considered. For a more precise comparison, use compare() or contains().

Definition at line 225 of file Schema.h.

225 { return compare(other, EQUAL_KEYS); }

◆ operator[]()

SubSchema lsst::afw::table::Schema::operator[] ( std::string const &  name) const
inline

Look up a (possibly incomplete) name in the Schema.

See SubSchema for more information.

This member function should generally only be used on "finished" Schemas; modifying a Schema after a SubSchema to it has been constructed will not allow the proxy to track the additions, and will invoke the copy-on-write mechanism of the Schema itself.

Definition at line 454 of file Schema.h.

454  {
455  return SubSchema(_impl, _aliases, name);
456 }

◆ readFits() [1/3]

Schema lsst::afw::table::Schema::readFits ( fits::Fits fitsfile)
static

Definition at line 631 of file Schema.cc.

631  {
632  daf::base::PropertyList header;
633  fitsfile.readMetadata(header, false);
634  return fromFitsMetadata(header);
635 }

◆ readFits() [2/3]

Schema lsst::afw::table::Schema::readFits ( fits::MemFileManager manager,
int  hdu = fits::DEFAULT_HDU 
)
static

Definition at line 625 of file Schema.cc.

625  {
626  fits::Fits fp{manager, "r", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK};
627  fp.setHdu(hdu);
628  return readFits(fp);
629 }

◆ readFits() [3/3]

Schema lsst::afw::table::Schema::readFits ( std::string const &  filename,
int  hdu = fits::DEFAULT_HDU 
)
static

Construct from reading a FITS file.

Reads from the nominated 'hdu' (0=PHU which cannot be a catalog, afw::fits::DEFAULT_HDU is a special value meaning read from the first HDU with NAXIS != 0).

Definition at line 619 of file Schema.cc.

619  {
620  fits::Fits fp{filename, "r", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK};
621  fp.setHdu(hdu);
622  return readFits(fp);
623 }

◆ replaceField()

template<typename T >
void lsst::afw::table::Schema::replaceField ( Key< T > const &  key,
Field< T > const &  field 
)

Replace the Field (name/description) for an existing Key.

Definition at line 674 of file Schema.cc.

674  {
675  _edit();
676  _impl->replaceField(key, field);
677 }

◆ setAliasMap()

void lsst::afw::table::Schema::setAliasMap ( std::shared_ptr< AliasMap aliases)

Set the alias map.

This resets the internal pointer to the alias map, disconnecting this schema from any others it shares aliases with.

Passing a null pointer is equivalent to passing an empty map.

Definition at line 722 of file Schema.cc.

722  {
723  if (!aliases) {
724  aliases = std::make_shared<AliasMap>();
725  }
726  _aliases = aliases;
727 }

Friends And Related Function Documentation

◆ detail::Access

friend class detail::Access
friend

Definition at line 315 of file Schema.h.

◆ operator<<

std::ostream& operator<< ( std::ostream os,
Schema const &  schema 
)
friend

Stringification.

Definition at line 751 of file Schema.cc.

751  {
752  os << "Schema(\n";
753  schema.forEach(Stream(&os));
754  for (auto iter = schema.getAliasMap()->begin(); iter != schema.getAliasMap()->end(); ++iter) {
755  os << " '" << iter->first << "'->'" << iter->second << "'\n";
756  }
757  return os << ")\n";
758 }

◆ SubSchema

friend class SubSchema
friend

Definition at line 316 of file Schema.h.

Member Data Documentation

◆ VERSION

int const lsst::afw::table::Schema::VERSION = detail::SchemaImpl::VERSION
static

Definition at line 56 of file Schema.h.


The documentation for this class was generated from the following files:
schema
table::Schema schema
Definition: Amplifier.cc:115
std::for_each
T for_each(T... args)
std::string
STL class.
lsst::afw::table::Schema::addField
Key< T > addField(Field< T > const &field, bool doReplace=false)
Add a new field to the Schema, and return the associated Key.
Definition: Schema.cc:668
base
Definition: __init__.py:1
lsst::afw::table::Schema::compare
int compare(Schema const &other, int flags=EQUAL_KEYS) const
Do a detailed equality comparison of two schemas.
Definition: Schema.cc:698
lsst::afw::geom.transform.transformContinued.name
string name
Definition: transformContinued.py:32
lsst::afw::table::Schema::forEach
void forEach(F &&func) const
Apply a functor to each SchemaItem in the Schema.
Definition: Schema.h:212
lsst::afw::table::Schema::EQUAL_KEYS
@ EQUAL_KEYS
Keys have the same types offsets, and sizes.
Definition: Schema.h:65
lsst::afw::table::Schema::operator==
bool operator==(Schema const &other) const
Equality comparison.
Definition: Schema.h:225
lsst::afw::table::Schema::Schema
Schema()
Construct an empty Schema.
Definition: Schema.cc:609
result
std::unique_ptr< SchemaItem< U > > result
Definition: Schema.cc:195
lsst::afw::fits::Fits::AUTO_CHECK
@ AUTO_CHECK
Definition: fits.h:308
lsst::afw::fits::Fits::AUTO_CLOSE
@ AUTO_CLOSE
Definition: fits.h:307
other
ItemVariant const * other
Definition: Schema.cc:56
field
table::Key< int > field
Definition: ApCorrMap.cc:77
lsst::afw::table::Schema::readFits
static Schema readFits(std::string const &filename, int hdu=fits::DEFAULT_HDU)
Construct from reading a FITS file.
Definition: Schema.cc:619
lsst::afw::table::Schema::join
std::string join(std::string const &a, std::string const &b) const
Join strings using the field delimiter appropriate for this Schema.
Definition: Schema.cc:641
name
std::string name
Definition: Schema.cc:194
lsst::afw::table::Schema::EQUAL_ALIASES
@ EQUAL_ALIASES
Schemas have identical AliasMaps.
Definition: Schema.h:70
lsst::afw::table::Schema::EQUAL_DOCS
@ EQUAL_DOCS
Fields have the same documentation (ordered).
Definition: Schema.h:67
b
table::Key< int > b
Definition: TransmissionCurve.cc:467
lsst::afw::table::Schema::IDENTICAL
@ IDENTICAL
Everything is the same.
Definition: Schema.h:71
lsst::afw::table::Schema::EQUAL_UNITS
@ EQUAL_UNITS
Fields have the same units (ordered).
Definition: Schema.h:68
os
std::ostream * os
Definition: Schema.cc:746
lsst::utils::hashCombine
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
Definition: hashCombine.h:35
a
table::Key< int > a
Definition: TransmissionCurve.cc:466
lsst::afw::table::Schema::fromFitsMetadata
static Schema fromFitsMetadata(daf::base::PropertyList &header, bool stripMetadata=true)
Construct from reading a FITS header.
Definition: Schema.cc:637
key
Key< U > key
Definition: Schema.cc:281
lsst::afw::table::Schema::SubSchema
friend class SubSchema
Definition: Schema.h:316
std::size_t
lsst::afw::table::Schema::EQUAL_NAMES
@ EQUAL_NAMES
Fields have the same names (ordered).
Definition: Schema.h:66
lsst::afw::table::Schema::getAliasMap
std::shared_ptr< AliasMap > getAliasMap() const
Return the map of aliases.
Definition: Schema.h:269
lsst::afw::table::Schema::contains
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
Definition: Schema.cc:679
lsst::afw::table::Schema::EQUAL_FIELDS
@ EQUAL_FIELDS
Fields are identical (but aliases may not be).
Definition: Schema.h:69
astshim.fitsChanContinued.iter
def iter(self)
Definition: fitsChanContinued.py:88