NSLS-II-CSX / csxtools

Useful python tools for CSX (23-ID)
http://nsls-ii-csx.github.io/csxtools
Other
4 stars 13 forks source link

get_images function throws depreciation error #63

Closed mpmdean closed 1 year ago

mpmdean commented 5 years ago

get_fastccd_images calls the decepricated get_images function rather than accessing via the databroker

using CSX on srv2 (current) kernal:

from databroker import DataBroker as db
from csxtools.utils import get_fastccd_images
slicerator = get_fastccd_images(db[108225])

Processing without dark images
/opt/conda_envs/analysis-2018-2.1/lib/python3.6/site-packages/csxtools/utils.py:181: UserWarning: Images and get_images are deprecated. Use Header.data('fccd_image') instead.
  images = header.db.get_images(header, tag)
licode commented 5 years ago

right, we prefer to use header.table(key) directly now. http://nsls-ii.github.io/databroker/tutorial.html

we will need a new version number on csxtools.

danielballan commented 5 years ago

right, we prefer to use header.table(key) directly now

That's not quite right. This doesn't access the data as a table, so header.table(key) is not relevant. As the warning message says, csxtools should be updated to use header.data(key).

danielballan commented 5 years ago

P.S. Thanks for flagging this @mpmdean. Always helpful when people read and report the warnings!

ambarb commented 1 year ago

https://github.com/NSLS-II-CSX/csxtools/pull/86 addresses this. Merge is expected soon.