SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
utils.h File Reference
#include <iostream>
#include <memory>
#include <utility>
#include <valarray>
#include <string>
#include <algorithm>
#include <opencv2/opencv.hpp>
#include <CCfits/CCfits>
#include "ElementsKernel/Exception.h"
#include "AlexandriaKernel/memory_tools.h"
#include "ModelFitting/Image/OpenCvPsf.h"
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void writeToFits (const cv::Mat &image, const std::string &filename)
 
ModelFitting::OpenCvPsf readPsf (const std::string &filename)
 
std::pair< cv::Mat, double > readImage (const std::string &filename)
 
std::vector< std::pair
< cv::Mat, double > > 
readFrames (const std::string &filename)
 
void printLevmarInfo (std::array< double, 10 > info)
 

Detailed Description

Copyright © 2019 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Date
September 2, 2015
Author
Nikolaos Apostolakos

Definition in file utils.h.

Function Documentation

void printLevmarInfo ( std::array< double, 10 >  info)

Definition at line 118 of file utils.h.

Referenced by main().

std::vector<std::pair<cv::Mat, double> > readFrames ( const std::string filename)

Definition at line 95 of file utils.h.

References std::copy(), ModelFitting::height, pixel_scale, and ModelFitting::width.

Referenced by main().

Here is the call graph for this function:

std::pair<cv::Mat, double> readImage ( const std::string filename)

Reads an image from a FITS file. The header must contain the keyword SCALE with the pixelscale of the image. It returns a pair of a cv::Mat containing the data and a double with the pixel scale.

Definition at line 77 of file utils.h.

References std::copy(), ModelFitting::height, std::make_pair(), pixel_scale, and ModelFitting::width.

Referenced by main().

Here is the call graph for this function:

ModelFitting::OpenCvPsf readPsf ( const std::string filename)

Reads a PSF from a fits file. The image must be square and have sides of odd number of pixels. The pixel scale is read by the header keyword SCALE which must be present

Definition at line 53 of file utils.h.

References std::copy(), and pixel_scale.

Referenced by main().

Here is the call graph for this function:

void writeToFits ( const cv::Mat &  image,
const std::string filename 
)

Writes an OpenCv Mat to an image FITS file (prepend the filename with '!' to override existing files)

Definition at line 40 of file utils.h.

References std::copy().

Referenced by main().

Here is the call graph for this function: