LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
43 bool initFromWcs,
unsigned nNotFit,
unsigned order)
45 _skyToTangentPlane(projectionHandler)
50 for (
auto i = ccdImageList.
cbegin(); i != ccdImageList.
cend(); ++i, ++
count) {
52 if (
count < nNotFit) {
70 while (pol.
getNpar() > 2 * nObj) {
72 << pol.
getOrder() <<
", due to too few sources (" << nObj
73 <<
" vs. " << pol.
getNpar() <<
" parameters)");
89 pol = pol * shiftAndNormalize.
inverted();
98 return findMapping(ccdImage);
102 if (whatToFit.
find(
"Distortions") == std::string::npos) {
103 LOGLS_ERROR(
_log,
"AssignIndices was called and Distortions is *not* in whatToFit.");
106 Eigen::Index index = firstIndex;
107 for (
auto i = _myMap.begin(); i != _myMap.end(); ++i) {
117 for (
auto &i : _myMap) {
118 auto mapping = i.second.get();
119 mapping->offsetParams(delta.segment(mapping->getIndex(), mapping->getNpar()));
124 for (
auto &i : _myMap) i.second->freezeErrorTransform();
129 for (
auto &i : _myMap) {
130 total += i.second->getNpar();
136 out <<
"SimpleAstrometryModel: " << _myMap.size() <<
" mappings" <<
std::endl;
138 out <<
"Sensor to sky transforms:" <<
std::endl;
139 for (
auto &i : _myMap) {
162 auto iwcToSkyMap = iwcToSkyWcs->getFrameDict()->getMapping(
"PIXELS",
"SKY");
163 auto skyFrame = iwcToSkyWcs->getFrameDict()->getFrame(
"SKY");
166 frameDict.
addFrame(
"IWC", *iwcToSkyMap, *skyFrame);
167 return std::make_shared<afw::geom::SkyWcs>(frameDict);
172 if (i == _myMap.end())
174 "SimpleAstrometryModel cannot find CcdImage " + ccdImage.
getName());
175 return i->second.get();
constexpr AngleUnit degrees
constant with units of degrees
CcdImageKey getHashKey() const
std::shared_ptr< afw::geom::SkyWcs > makeSkyWcs(CcdImage const &ccdImage) const override
Make a SkyWcs that contains this model.
void freezeErrorTransform() override
void offsetParams(Eigen::VectorXd const &delta) override
Offset the parameters by the provided amounts (by -delta).
SimpleAstrometryModel(CcdImageList const &ccdImageList, const std::shared_ptr< ProjectionHandler const > projectionHandler, bool initFromWCS, unsigned nNotFit=0, unsigned order=3)
A FrameSet whose frames can be referenced by domain name.
void addFrame(int iframe, Mapping const &map, Frame const &frame) override
Add a new Frame and an associated Mapping to this FrameSet so as to define a new coordinate system,...
#define LOGLS_ERROR(logger, message)
std::string getName() const
Return the _name that identifies this ccdImage.
#define LOGLS_WARN(logger, message)
Frame is used to represent a coordinate system.
Frame const & getImageFrame() const
Frame in pixels.
Interface between AstrometryFit and the combinations of Mappings from pixels to some tangent plane (a...
Handler of an actual image from a single CCD.
AstrometryTransformLinear normalizeCoordinatesTransform(const Frame &frame)
Returns the transformation that maps the input frame along both axes to [-1,1].
LOG_LOGGER _log
lsst.logging instance, to be created by a subclass so that messages have consistent name.
std::size_t getTotalParameters() const override
Return the total number of parameters in this model.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
std::shared_ptr< AstrometryTransform > const getPixelToTangentPlane() const
const AstrometryMapping * getMapping(CcdImage const &) const override
Mapping associated to a given CcdImage.
Mapping implementation for a polynomial transformation.
Reports invalid arguments.
Eigen::Matrix2d makeCdMatrix(lsst::geom::Angle const &scale, lsst::geom::Angle const &orientation=0 *lsst::geom::degrees, bool flipX=false)
Make a WCS CD matrix.
const std::shared_ptr< AstrometryTransform const > getSkyToTangentPlane(CcdImage const &ccdImage) const override
the mapping of sky coordinates (i.e.
virtual class needed in the abstraction of the distortion model
std::shared_ptr< SkyWcs > makeSkyWcs(daf::base::PropertySet &metadata, bool strip=false)
Construct a SkyWcs from FITS keywords.
MeasuredStarList const & getCatalogForFit() const
Gets the catalog to be used for fitting, which may have been cleaned-up.
Point in an unspecified spherical coordinate system.
void print(std::ostream &out) const override
Print a string representation of the contents of this mapping, for debugging.
std::size_t getNpar() const override
Number of parameters in total.
void setIndex(Eigen::Index i)
Set the index of this mapping in the grand fit.
Eigen::Index assignIndices(std::string const &whatToFit, Eigen::Index firstIndex) override
Positions the various parameter sets into the parameter vector, starting at firstIndex.
AstrometryTransform const & getTransform(CcdImage const &ccdImage) const
Access to mappings.
LSST DM logging module built on log4cxx.
rectangle with sides parallel to axes.