Detector

Detector — Detector geometry

Synopsis

#include "detector.h"


struct              detector;
struct              panel;
struct              badregion;
struct              rigid_group;
struct              rg_collection;

struct detector *   copy_geom                           (const struct detector *in);
void                fill_in_values                      (struct detector *det,
                                                         struct hdfile *f,
                                                         struct event *ev);
void                free_detector_geometry              (struct detector *det);
struct detector *   get_detector_geometry               (const char *filename,
                                                         struct beam_params *beam);
int                 write_detector_geometry             (const char *geometry_filename,
                                                         const char *output_filename,
                                                         struct detector *det);
int                 write_detector_geometry_2           (const char *geometry_filename,
                                                         const char *output_filename,
                                                         struct detector *det,
                                                         const char *additional_comment,
                                                         int write_panel_coffset);
struct panel *      find_panel                          (struct detector *det,
                                                         double fs,
                                                         double ss);
struct panel *      find_panel_by_name                  (struct detector *det,
                                                         const char *name);
signed int          find_panel_number                   (struct detector *det,
                                                         double fs,
                                                         double ss);
struct detector *   simple_geometry                     (const struct image *image);
void                record_image                        (struct image *image,
                                                         int do_poisson,
                                                         double background,
                                                         gsl_rng *rng,
                                                         double beam_radius,
                                                         double nphotons);
void                get_pixel_extents                   (struct detector *det,
                                                         double *min_x,
                                                         double *min_y,
                                                         double *max_x,
                                                         double *max_y);
struct rvec         get_q                               (struct image *image,
                                                         double fs,
                                                         double ss,
                                                         double *ttp,
                                                         double k);
struct rvec         get_q_for_panel                     (struct panel *p,
                                                         double fs,
                                                         double ss,
                                                         double *ttp,
                                                         double k);
double              get_tt                              (struct image *image,
                                                         double xs,
                                                         double ys,
                                                         int *err);
double              smallest_q                          (struct image *image);
int                 reverse_2d_mapping                  (double x,
                                                         double y,
                                                         double *pfs,
                                                         double *pss,
                                                         struct detector *det);
double              largest_q                           (struct image *image);
int                 in_bad_region                       (struct detector *det,
                                                         double fs,
                                                         double ss);
void                mark_resolution_range_as_bad        (struct image *image,
                                                         double min,
                                                         double max);
struct panel *      find_orig_panel                     (struct detector *det,
                                                         double fs,
                                                         double ss);
int                 panel_is_in_rigid_group             (const struct rigid_group *rg,
                                                         struct panel *p);
int                 rigid_group_is_in_collection        (struct rg_collection *c,
                                                         struct rigid_group *rg);
int                 single_panel_data_source            (struct detector *det,
                                                         const char *element);
struct rg_collection * find_rigid_group_collection_by_name
                                                        (struct detector *det,
                                                         const char *name);

Description

This structure represents the detector geometry

Details

struct detector

struct detector;

struct panel

struct panel;

struct badregion

struct badregion;

struct rigid_group

struct rigid_group;

struct rg_collection

struct rg_collection;

copy_geom ()

struct detector *   copy_geom                           (const struct detector *in);

fill_in_values ()

void                fill_in_values                      (struct detector *det,
                                                         struct hdfile *f,
                                                         struct event *ev);

free_detector_geometry ()

void                free_detector_geometry              (struct detector *det);

get_detector_geometry ()

struct detector *   get_detector_geometry               (const char *filename,
                                                         struct beam_params *beam);

write_detector_geometry ()

int                 write_detector_geometry             (const char *geometry_filename,
                                                         const char *output_filename,
                                                         struct detector *det);

write_detector_geometry_2 ()

int                 write_detector_geometry_2           (const char *geometry_filename,
                                                         const char *output_filename,
                                                         struct detector *det,
                                                         const char *additional_comment,
                                                         int write_panel_coffset);

find_panel ()

struct panel *      find_panel                          (struct detector *det,
                                                         double fs,
                                                         double ss);

find_panel_by_name ()

struct panel *      find_panel_by_name                  (struct detector *det,
                                                         const char *name);

find_panel_number ()

signed int          find_panel_number                   (struct detector *det,
                                                         double fs,
                                                         double ss);

simple_geometry ()

struct detector *   simple_geometry                     (const struct image *image);

record_image ()

void                record_image                        (struct image *image,
                                                         int do_poisson,
                                                         double background,
                                                         gsl_rng *rng,
                                                         double beam_radius,
                                                         double nphotons);

get_pixel_extents ()

void                get_pixel_extents                   (struct detector *det,
                                                         double *min_x,
                                                         double *min_y,
                                                         double *max_x,
                                                         double *max_y);

get_q ()

struct rvec         get_q                               (struct image *image,
                                                         double fs,
                                                         double ss,
                                                         double *ttp,
                                                         double k);

get_q_for_panel ()

struct rvec         get_q_for_panel                     (struct panel *p,
                                                         double fs,
                                                         double ss,
                                                         double *ttp,
                                                         double k);

get_tt ()

double              get_tt                              (struct image *image,
                                                         double xs,
                                                         double ys,
                                                         int *err);

smallest_q ()

double              smallest_q                          (struct image *image);

reverse_2d_mapping ()

int                 reverse_2d_mapping                  (double x,
                                                         double y,
                                                         double *pfs,
                                                         double *pss,
                                                         struct detector *det);

largest_q ()

double              largest_q                           (struct image *image);

in_bad_region ()

int                 in_bad_region                       (struct detector *det,
                                                         double fs,
                                                         double ss);

mark_resolution_range_as_bad ()

void                mark_resolution_range_as_bad        (struct image *image,
                                                         double min,
                                                         double max);

Flags, in the bad pixel mask for image, every pixel whose resolution is between min and max.

image :

An image structure

min :

Minimum value of 1/d to be marked as bad

max :

Maximum value of 1/d to be marked as bad

find_orig_panel ()

struct panel *      find_orig_panel                     (struct detector *det,
                                                         double fs,
                                                         double ss);

panel_is_in_rigid_group ()

int                 panel_is_in_rigid_group             (const struct rigid_group *rg,
                                                         struct panel *p);

rigid_group_is_in_collection ()

int                 rigid_group_is_in_collection        (struct rg_collection *c,
                                                         struct rigid_group *rg);

single_panel_data_source ()

int                 single_panel_data_source            (struct detector *det,
                                                         const char *element);

find_rigid_group_collection_by_name ()

struct rg_collection * find_rigid_group_collection_by_name
                                                        (struct detector *det,
                                                         const char *name);