diff options
author | Thomas White <taw@physics.org> | 2020-02-26 16:17:03 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:24 +0200 |
commit | 300f09607bb06bbbac1ffbeb2ad2e6985459abd1 (patch) | |
tree | e90dfb57a3f0ffc18b9350b978f1f16a0ed6d09a /libcrystfel/src/detgeom.h | |
parent | cb47e755858296d59f4ceb373bcd20b045004f56 (diff) |
Create detgeom structure on image load
Diffstat (limited to 'libcrystfel/src/detgeom.h')
-rw-r--r-- | libcrystfel/src/detgeom.h | 139 |
1 files changed, 4 insertions, 135 deletions
diff --git a/libcrystfel/src/detgeom.h b/libcrystfel/src/detgeom.h index e13913ba..88e0f76f 100644 --- a/libcrystfel/src/detgeom.h +++ b/libcrystfel/src/detgeom.h @@ -37,15 +37,6 @@ #ifndef DETGEOM_H #define DETGEOM_H -struct rigid_group; -struct rg_collection; -struct detector; -struct panel; -struct badregion; - -#include "hdf5-file.h" -#include "image.h" - #ifdef __cplusplus extern "C" { #endif @@ -56,26 +47,10 @@ extern "C" { */ -struct rigid_group -{ - char *name; - struct panel **panels; - int n_panels; -}; - - -struct rg_collection -{ - char *name; - struct rigid_group **rigid_groups; - int n_rigid_groups; -}; - - /** * Represents one panel of a detector */ -struct panel +struct detgeom_panel { /** Text name for panel */ const char *name; @@ -91,10 +66,6 @@ struct panel /** Pixel size in metres */ double pixel_pitch; - /** Readout direction (for filtering out clusters of peaks) - * ('x' or 'y') */ - char badrow; - /** Number of detector intensity units per photon (or electron, etc) */ double adu_per_photon; @@ -111,14 +82,6 @@ struct panel double ssz; /*@}*/ - /** \name Inverse of 2D part of transformation matrix */ - /*@{*/ - double xfs; - double yfs; - double xss; - double yss; - /*@}*/ - /** \name Width and height of panel */ /*@{*/ int w; @@ -127,36 +90,10 @@ struct panel }; -struct badregion +struct detgeom { - char name[1024]; - int is_fsss; - char *panel; - - double min_x; - double max_x; - double min_y; - double max_y; - - /* Specified INCLUSIVELY */ - int min_fs; - int max_fs; - int min_ss; - int max_ss; - -}; - - -struct detector -{ - struct panel *panels; - int n_panels; - - struct rigid_group **rigid_groups; - int n_rigid_groups; - - struct rg_collection **rigid_group_collections; - int n_rg_collections; + struct detgeom_panel *panels; + int n_panels; /* Location of the pixel furthest away from the beam position, which * will have the largest value of 2theta regardless of camera length @@ -171,74 +108,6 @@ struct detector double furthest_in_ss; }; - -extern struct rvec get_q_for_panel(struct panel *p, double fs, double ss, - double *ttp, double k); - -extern double get_tt(struct image *image, double xs, double ys, int *err); - -extern struct panel *find_orig_panel(struct detector *det, - double fs, double ss); - -extern signed int find_orig_panel_number(struct detector *det, - double fs, double ss); - -extern int panel_number(const struct detector *det, const struct panel *p); - -extern struct detector *get_detector_geometry(const char *filename, - struct beam_params *beam); - -extern struct detector *get_detector_geometry_2(const char *filename, - struct beam_params *beam, - char **hdf5_peak_path); - -extern struct detector *get_detector_geometry_from_string(const char *string, - struct beam_params *beam, - char **hdf5_peak_path); - -extern void free_detector_geometry(struct detector *det); - -extern void get_pixel_extents(struct detector *det, - double *min_x, double *min_y, - double *max_x, double *max_y); - -extern int panel_is_in_rigid_group(const struct rigid_group *rg, - struct panel *p); - -extern int rigid_group_is_in_collection(struct rg_collection *c, - struct rigid_group *rg); - -extern int reverse_2d_mapping(double x, double y, struct detector *det, - struct panel **pp, double *pfs, double *pss); - -extern double largest_q(struct image *image); - -extern double smallest_q(struct image *image); - -extern struct panel *find_panel_by_name(struct detector *det, const char *name); - -extern int write_detector_geometry_2(const char *geometry_filename, - const char *output_filename, - struct detector *det, - const char *additional_comment, - int write_panel_coffset); - -extern int write_detector_geometry_3(const char *geometry_data, - const char *output_filename, - struct detector *det, - const char *additional_comment, - int write_panel_coffset); - -extern int write_detector_geometry(const char *geometry_filename, - const char *output_filename, - struct detector *det); - -extern void mark_resolution_range_as_bad(struct image *image, - double min, double max); - -struct rg_collection *find_rigid_group_collection_by_name(struct detector *det, - const char *name); - #ifdef __cplusplus } #endif |