aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/datatemplate.c
AgeCommit message (Collapse)Author
2024-05-14data_template_write_to_fh: Fix output of mask filenameThomas White
2024-05-06data_template_write_to_fh: Don't try to write coffset at top levelThomas White
Previously, there was a bad bug here. We would still try to write a top-level coffset even if panels have moved such that the coffset is no longer a single value. One possibility is to unset panel->cnz_offset_default when moving a panel. This works, but we have to do it on every translation, or accept a floating-point comparison with zero and associated non-determinism. It's very likely that if we move one panel, we'll be moving all panels, even if only by a small amount. So, a more stable way seems to just write separate coffset values all the time. The coffset values aren't really meant to be used at the top level anyway (that's what clen is for!), so this fits pretty well.
2024-05-02data_template_write_to_fh: Fix bad region outputThomas White
Two problems: 1. Didn't take into account that bad->name already includes the prefix "bad". 2. Didn't convert the panel-relative coordinates back to slab-relative. Fixes: https://github.com/taw10/crystfel/issues/11
2024-04-26DataTemplate: Add an "all" group if no panel definitions are givenThomas White
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/96
2024-04-26WhitespaceThomas White
2024-04-26crystfel_geometry(5): Mention that group definitions must come after panelsThomas White
Also mention this when complaining about the geometry file. Fixes: https://github.com/taw10/crystfel/issues/10
2024-04-18Merge branch 'julia'Thomas White
2024-02-20Set default flag for panel dimensionsThomas White
This was missed out, causing DataTemplates to be written incorrectly.
2024-02-06Use libcrystfel memory allocation routines everywhereThomas White
2024-02-02Fix lies in documentationThomas White
2024-01-30Add data_template_write_to_fh and stream_write_data_templateThomas White
2023-12-19Check for duplicate member in panel groupThomas White
Example: group_all = q0,q1,q2,q2
2023-09-22Don't complain about missing 'all' group until it's actually neededThomas White
2023-09-12Fix sense of panel rotationsThomas White
Should always be a right-hand grip rotation around positive axis direction.
2023-08-29Automatically add top-level group for single-panel detectorsThomas White
2023-07-28Initialise det->top_groupThomas White
2023-07-28data_template_free: Free the groups as wellThomas White
2023-07-28Implement data_template_group_info()Thomas White
2023-07-28Re-define geometry group labelling schemeThomas White
The old version was totally broken. The serial numbers have to contain the complete hierarchy information, otherwise they aren't unique.
2023-07-28Move rotate2d to utilsThomas White
2023-07-28detgeom: Add panel group center coordinatesThomas White
2023-07-28Avoid segfault if geometry file doesn't have groupsThomas White
2023-07-28detgeom: Add references from children to parentsThomas White
This allows us to start from the panel and work upwards to the top-level group, which makes hierarchical gradient calculation much easier.
2023-07-28Remove debugging messagesThomas White
2023-07-28Fix incorrect rotationsThomas White
2023-07-28Rename top-level panel group to 'all'Thomas White
Rationale: 'top' sounds kind of geometrical
2023-07-28Implement data_template_write_to_file()Thomas White
2023-07-28DataTemplate: Track which values came from top levelThomas White
2023-07-28Make 'clen' a top-level geometry property, instead of per-panelThomas White
This makes huge simplifications in a lot of areas, and in practice should not be noticed by anyone.
2023-07-28Implement data_template_rotate_group()Thomas White
2023-07-28Implement data_template_translate_group_{px,m}()Thomas White
2023-07-28Add data_template_show_hierarchy()Thomas White
2023-07-28Transfer detector hierarchy to detgeomThomas White
2023-07-28DataTemplate: Parse hierarchical groupsThomas White
2023-07-28Strip out old rigid_group APIThomas White
2023-07-27Fix some more memory leaksThomas White
2023-05-11Remove warning 'Cannot use adu_per_eV without image'Thomas White
The warning isn't helpful for users, but commit c2574910 causes it to appear many times on almost every indexamajig run. The best option is just to remove it.
2023-03-31Reject mask if good/bad bits are specified without locationThomas White
This should avoid surprises if the location is accidentally missed out.
2023-03-31Factorise p->masks[j]Thomas White
Just to avoid repetition
2023-03-31Reject unrecognised mask directivesThomas White
2023-02-08indexamajig: Use static clen as --camera-length-estimate, if givenThomas White
This makes it work the same way as --wavelength-estimate.
2022-10-05data_template_get_2d_detgeom_if_possible: Avoid segfault with adu_per_eVThomas White
2022-09-22all_panels_reference_same_clen: Handle missing unitsThomas White
2022-09-22Implement data_template_get_2d_detgeom_if_possibleThomas White
It is horrible. But it's contained inside the DataTemplate module.
2022-09-21create_detgeom: Return detgeom structure rather than altering image argumentThomas White
2022-09-21Move create_detgeom to DataTemplate moduleThomas White
It seems to make more sense here, because it's all about interpreting the contents of the DataTemplate structure.
2022-03-08Fix slabbiness assumptionsThomas White
This adds a new routine, data_template_slabby_file_to_panel_coords, to be used (only!) in places where external forces require assumptions of slabbiness: pixel maps and MsgPack/HDF5 peak lists (including CXI-style). This also fixes the prototype of data_template_file_to_panel_coords to make the panel number strictly an input parameter. This was an oversight in the implementation of DataTemplate, and caused problems when reading non-slabby streams. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/66
2021-10-28Add 'mask_panel_edges' to geometry fileThomas White
Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/27
2021-10-28Add a commentThomas White
2021-10-26Remove detector rail direction altogetherThomas White
This got missed out by accident in the conversion to DataTemplate, but absolutely no-one noticed. In the meantime, my views on how the geometry files should work have changed somewhat. I don't want to maintain the extra complexity here when it isn't even clear that it will eliminate the need to re-refine geometry for each camera length. This commit just takes the rail direction stuff out of the documentation and the geometry file parser. Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/50