aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
AgeCommit message (Collapse)Author
2021-10-28Add 'mask_panel_edges' to geometry fileThomas White
Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/27
2021-10-26create_detgeom: Factorise panel templateThomas White
2021-09-17Avoid pointless passing of image/eventThomas White
2021-07-21Reduce variable scope where possibleThomas White
2021-07-21Add missing cleanup on error pathsThomas White
2021-07-16Rename DST_* to DATA_SOURCE_TYPE_*Thomas White
On some systems, this conflicts with DST_NONE in sys/time.h.
2021-06-21image_cache_header_str: Reject strings containing newlinesThomas White
2021-06-16Add DST_NONE for 'no data source' (e.g. image came from stream)Thomas White
2021-05-28Pass errors back when retrieving values for wavelength etcThomas White
Big improvement on just sending NAN back. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/37
2021-05-17Resolve FIXMEs and TODOsThomas White
Prompted by the article linked below, for each FIXME/TODO I've either referenced an issue in the tracker, or removed it if it's not worth fixing. https://schleiss.io/plotting-source-code-todos-for-open-source-projects
2021-05-12Don't assume that headers to be copied are floatsThomas White
2021-05-12FussinessThomas White
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