aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
AgeCommit message (Collapse)Author
2021-05-12Rework header caching layerThomas White
This clears up multiple layering violations which were starting to get in the way. It enables "string" headers to be stored directly, and it will make it much simpler to add new header types in the future. Along the way, this changes all the floating point header stuff to use double precision. This is needed for EuXFEL event IDs. Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/34
2021-04-27Rename libcrystfel's config.h to libcrystfel-config.hThomas White
This removes the big potential for confusion, which has happened several times (see e.g. 095cbebaf6). It also fixes in-tree builds with CMake (but seriously, always use out-of-tree builds). Fixes #2.
2021-04-23indexamajig: Generate a unique filename for ZMQ dataThomas White
The unique filename is needed by the GUI for looking up results in a stream. Otherwise, the filename is "(null)" for everything and the lookup just returns the first chunk in the stream. The filename is generated based on the unique serial number for each chunk, and is therefore unique across one run of indexamajig regardless of the number of worker processes (-j). This might have to change in future to accommodate jobs run across multiple nodes, if there is any demand for looking at results in one big concatenated stream. This also changes the condition for deciding when to look for a 'real' file, to take into account that there is always a non-NULL filename.
2021-04-23Clarify some error messagesThomas White
2021-04-20image_read_data_block: Warn user if things go wrongThomas White
2021-04-20image_read_data_block: Set the correct data typeThomas White
2021-04-19Unify loading of image data and header valuesThomas White
This moves the entry point for loading MsgPack data to a new function, image_read_data_block. Inside image.c, the image structure can be created using exactly the same functions as for data files.
2021-04-19Move file_exists to utils (and eliminate several duplicates)Thomas White
2021-04-01Implement loading of saturation mapThomas White
2021-03-30Add header caching layerThomas White
This simultaneously implements --copy-header/--copy-hdf5-field and gives access to metadata (e.g. detector position or wavelength) when loading from a stream with header-specified values.
2021-03-17Add missing conversion to pixels for detector_shift_{x,y}Thomas White
2021-03-17Factorise panel in create_detgeomThomas White
2021-03-11indexamajig: Use static wavelength from DataTemplate as estimateThomas White
If the geometry file contains a literal wavelength, then let's use it. That's better than nagging the user for a --wavelength-estimate.
2021-03-11Add some warningsThomas White
2021-03-11detgeom_transform_coords: Take an additional detector shiftThomas White
This allows the refined detector position to be used in a lot of places.
2021-03-09Add the ability to use multiple bad pixel masks at onceThomas White
2021-03-05Mass update of copyright dates in source code commentsThomas White
2021-02-15Check that bad regions are actually within panel boundsThomas White
2021-01-27image_free: Also free the spectrumThomas White
2021-01-14Avoid very slow loop over pixels to create bad pixel mapThomas White
Bad regions specified in terms of x/y still require an iteration over all pixels of the detector, but I don't see an easy way around that. Avoiding x/y bad regions will give best performance.
2021-01-11create_badmap: Break down into subroutinesThomas White
Also flips the order of iteration for (negligibly) better performance
2020-12-18Add peak_list_type in geometry fileThomas White
2020-12-16Add flag_{lessthan,morethan,equal} in geometry fileThomas White
This makes handling Pilatus/Eiger files, as well as many others, much easier.
2020-10-27image_set_zero_{data,mask}: Speed up creation of blank arraysThomas White
2020-10-22image_expand_frames: When files are not HDF5, just return null eventsThomas White
2020-09-30image_expand_frames: Report non-existent file properlyThomas White
2020-09-24Apply default unit scale factor only when value is from headersThomas White
Ugh.
2020-09-08Un-export image_read_image_dataThomas White
Not needed since f5b3c4db36fa.
2020-08-19Set the same initial beam parameters as beforeThomas White
2020-08-11image_read_image_data: Set zero values if file not foundThomas White
2020-08-10image_read: Tolerate event==NULLThomas White
2020-08-07Remove image->avg_clenThomas White
Horrible API hack.
2020-08-04Add image_write()Thomas White
This is a one-to-one transfer of the old hdf5_write_image()
2020-08-04Add image_create_for_simulation()Thomas White
...and factorise common code
2020-07-31Move spectrum loading out of indexamajig/process_imageThomas White
2020-07-31Set bandwidth in image structureThomas White
2020-07-30Add show_panel() to APIThomas White
2020-07-30Add missing config.h includesThomas White
2020-07-30Eliminate duplicate symbolsThomas White
This makes searching easier, and also permits Meson's unity build mode.
2020-07-29Add show_panel (debug function)Thomas White
2020-07-29Don't try to apply shift if no value is givenThomas White
2020-07-29stream_read_chunk: Add option to load image dataThomas White
2020-07-29Unify creation of blank image data arraysThomas White
2020-07-29Add --no-image-data and --no-mask-dataThomas White
2020-07-29Move image structure creation up to image_read()Thomas White
2020-07-29Add detector_shift_{x,y} to geometry fileThomas White
2020-07-29Add wavelength and electron_voltage, plus units, to geometry fileThomas White
2020-07-29Create detgeom and data arrays when reading from streamThomas White
2020-07-29Remove events.c, part 2Thomas White
New event parsing, done at the last minute in image-hdf5.c
2020-07-29Remove events.c, part 1Thomas White