chanzuckerberg / cryoet-data-portal-backend

CryoET Data Portal API server & ingestion scripts
MIT License
1 stars 2 forks source link

TomoConverter `update_headers` function throwing ValueError #166

Closed daniel-ji closed 1 month ago

daniel-ji commented 1 month ago

For the following line in ingestion_tools/scripts/common/image.py, if the value of self.volume_reader.get_mrc_extended_header() is a numpy array, then an error will get thrown (see below):

if ext := self.volume_reader.get_mrc_extended_header():
    mrcfile.set_extended_header(ext)
2024-07-25 03:45:41.068 wdl.w:cryoet_data_ingestion.t:call-cryoet_data_ingestion_workflow.stderr VERBOSE ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

https://github.com/chanzuckerberg/cryoet-data-portal-backend/blob/5c96afb1dc885df6f6e546521dee7518cd2d41a5/ingestion_tools/scripts/common/image.py#L356

Thanks!

uermel commented 1 month ago

Fixed with https://github.com/chanzuckerberg/cryoet-data-portal-backend/pull/169