Add cataloging of images for VENUS instrument using batch API #101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description of the changes:
This PR adds support for cataloging FITS and TIFF image files for the VENUS instrument to address the 30-minute delay when cataloging 1500+ images. The implementation uses ONCat's batch API to efficiently catalog images in groups of 50, discovering image files from the PV
metadata.entry.daslogs.bl10:exp:im:imagefilepath.value.Long description of the changes:
The VENUS instrument produces 1500+ image files per experiment, which previously took 30 minutes to catalog individually. This PR moves the image cataloging from the DAQ side to the post-processing agent and implements efficient batch cataloging.
Key changes:
image_files()function to discover FITS and TIFF images from metadata pathsbatches()helper function to split image lists into chunks of 50ingest()method inONCatProcessorto catalog images usingoncat.Datafile.batch()Testing:
test_oncat_catalog_venus_images()to verify end-to-end workflow/api/datafiles/batchendpointThe implementation closely follows the prototype script
ingest-datafileand is isolated to the ONCat cataloging processor.Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
Prerequisites:
Testing steps:
Run unit tests to verify new functionality:
Expected: All 55 tests pass (12 new tests for oncat_processor)
Run integration tests (requires Docker):
cd tests/integration docker-compose up -d pixi run test-integration docker-compose downExpected: The new
test_oncat_catalog_venus_imagestest passes, verifying:Verify backward compatibility:
Expected behavior:
metadata.entry.daslogs.bl10:exp:im:imagefilepath.valuewill have their image files discovered and batch-catalogedReferences
/home/dzj/Downloads/ingest-datafile(attached to original issue)