GLAMERDOC++
Gravitational Lensing Code Library
Loading...
Searching...
No Matches
map_images.h
1/*
2 * map_images.h
3 *
4 * Created on: Oct 6, 2010
5 * Author: bmetcalf
6 */
7
8#ifndef MAP_IMAGES_H_
9#define MAP_IMAGES_H_
10
11#include <lens.h>
12#include <grid_maintenance.h>
13
14
17namespace ImageFinding{
18
19 void map_images(LensHndl lens,Source *source,GridHndl grid,int *Nimages
20 ,std::vector<ImageInfo> &imageinfo
21 ,double xmax,double xmin,double initial_size
22 ,ExitCriterion criterion,bool FindCenter,bool divide_images);
23
24 void map_images_fixedgrid(Source *source,GridHndl grid ,int *Nimages
25 ,std::vector<ImageInfo> &imageinfo
26 ,double xmax ,bool divide_images,bool find_borders);
27
28
29 void map_imagesISOP(LensHndl lens,Source *source,GridHndl grid,int *Nimages
30 ,std::vector<ImageInfo> &imageinfo,double rmax
31 ,double res_min,double initial_size,ExitCriterion criterion
32 ,bool divide_images,bool int_on = true,bool verbos=false);
33
34
35 namespace IF_routines{
36 int refine_grid_on_image(Lens *lens,Source *source,GridHndl grid,double maxflux
37 ,std::vector<ImageInfo> &imageinfo,int *Nimages
38 ,std::vector<ImageInfo> &sourceinfo,int Nsources
39 ,const double res_target,ExitCriterion criterion
40 ,bool divide_images,bool batch=true);
41
42 void check_sb_add(Source *source,ImageInfo *imageinfo,Point *i_points,double maxflux,unsigned long &Nold,int &number_of_refined);
43
44 bool RefinePoint(Point *point,TreeHndl i_tree,double image_area,double total_area,ExitCriterion criterion
45 ,double res_target,Kist<Point> * nearest);
46 bool RefinePoint2(Point *point,TreeHndl i_tree,double image_area,double total_area,double maxflux,ExitCriterion criterion
47 ,double res_target,Kist<Point> * nearest);
48
49 bool RefinePoint_sb(Point *point,TreeHndl i_tree,double image_area,double total_area
50 ,double sb_limit,PosType maxflux,Kist<Point> * nearest);
51
52 bool RefinePoint_smallsize(Point *point,TreeHndl i_tree,double image_area,double total_area
53 ,double smallsize,PosType maxflux,Kist<Point> * nearest);
54 void IntegrateFluxInCell(Point *point,Source &source,float tolerance,Boo &outcome);
55 void IntegrateCellsParallel(Kist<Point>::iterator it1
56 ,Kist<Point>::iterator it2,Source *source,PosType *area,size_t *count);
57
58 void interpfrom2Points(Point const * p1,Point const * p2,PosType *x,PosType *y);
59
60 void UniformMagCheck(ImageInfo *imageinfo);
61
62
63
64 int refine_grid_on_imageISOP(Lens *lens,Source *source,GridHndl grid
65 ,std::vector<ImageInfo> &imageinfo,int *Nimages,int Nsources
66 ,double res_target,double res_min
67 ,double res_source_area,ExitCriterion criterion
68 ,bool divide_images);
69
70 }
71}
72#endif
A class to represents a lens with multiple planes.
Definition lens.h:71
Base class for all sources.
Definition source.h:44
The ImageFinding namespace is for functions related to finding and mapping images.
Definition grid_maintenance.h:243
void map_imagesISOP(LensHndl lens, Source *source, GridHndl grid, int *Nimages, std::vector< ImageInfo > &imageinfo, double rmax, double res_min, double initial_size, ExitCriterion criterion, bool divide_images, bool int_on=true, bool verbos=false)
Find images and refine them based on their surface brightness distribution.
Definition map_imagesISOP.cpp:25
void map_images_fixedgrid(Source *source, GridHndl grid, int *Nimages, std::vector< ImageInfo > &imageinfo, double xmax, bool divide_images, bool find_borders)
Find the images without any additional grid refinement or ray shooting.
Definition map_images.cpp:581
Structure to contain both source and image trees.
Definition grid_maintenance.h:25
Structure for storing information about images or curves.
Definition image_info.h:20
A point on the source or image plane that contains a position and the lensing quantities.
Definition point.h:414
Tree: Exported struct.
Definition Tree.h:31