|
DataTemplate * | data_template_new_from_file (const char *filename) |
|
DataTemplate * | data_template_new_from_string (const char *string_in) |
|
void | data_template_free (DataTemplate *dt) |
|
const char * | data_template_panel_number_to_name (const DataTemplate *dt, int pn) |
|
int | data_template_panel_name_to_number (const DataTemplate *dt, const char *panel_name, int *pn) |
|
int | data_template_file_to_panel_coords (const DataTemplate *dt, float *pfs, float *pss, int pn) |
|
int | data_template_slabby_file_to_panel_coords (const DataTemplate *dt, float *pfs, float *pss, int *ppn) |
|
int | data_template_panel_to_file_coords (const DataTemplate *dt, int pn, float *pfs, float *pss) |
|
void | data_template_add_copy_header (DataTemplate *dt, const char *header) |
|
int | data_template_get_slab_extents (const DataTemplate *dt, int *pw, int *ph) |
|
double | data_template_get_wavelength_if_possible (const DataTemplate *dt) |
|
double | data_template_get_clen_if_possible (const DataTemplate *dt) |
|
struct detgeom * | data_template_get_2d_detgeom_if_possible (const DataTemplate *dt) |
|
void | data_template_show_hierarchy (const DataTemplate *dtempl) |
|
int | data_template_translate_group_px (DataTemplate *dtempl, const char *group_name, double x, double y, double z) |
|
int | data_template_translate_group_m (DataTemplate *dtempl, const char *group_name, double x, double y, double z) |
|
int | data_template_rotate_group (DataTemplate *dtempl, const char *group_name, double ang, char axis) |
|
int | data_template_write_to_fh (const DataTemplate *dtempl, FILE *fh) |
|
int | data_template_write_to_file (const DataTemplate *dtempl, const char *filename) |
|
struct dg_group_info * | data_template_group_info (const DataTemplate *dtempl, int *n) |
|
Template for loading data.
Create a detgeom structure from the DataTemplate, if possible, and ignoring 3D information.
This procedure will create a detgeom structure provided that the detector is close to lying in a single flat plane perpendicular to the beam direction. If certain things (e.g. panel z-positions) refer to headers, it might not be possible to determine that the detector is really flat until an image is loaded. Therefore you must gracefully handle a NULL return value from this routine.
- Returns
- the detgeom structure, or NULL if impossible.
int data_template_slabby_file_to_panel_coords |
( |
const DataTemplate * | dt, |
|
|
float * | pfs, |
|
|
float * | pss, |
|
|
int * | ppn ) |
|
extern |
Convert image-data-space fs/ss coordinates to panel-relative fs/ss coordinates and panel number, assuming that the data is all in one slab.
WARNING: This is probably not the routine you are looking for! If you use this routine, your code will only work with 'slabby' data, and will break for (amongst others) EuXFEL data. Use data_template_file_to_panel_coords instead, and provide the panel number.
- Returns
- 0 on success, 1 on failure