EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
<== Date ==> <== Thread ==>

Subject: Writing XML directly to area detector's NDAttributesFile PV
From: "Wolfman, Mark via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 24 Sep 2024 15:24:51 +0000
Hi, all.

I'm configuring our area detectors to save ROI stats, etc into the HDF files alongside the image data. I'm looking for a way to dynamically set the NDAttributes that get included by the HDF file plugin.

As a test, I'm using the XML snippet pasted below on our ADSimDet detector (ADCore version 3.12.1). If I put the XML into a file, and put the file path into the PV 25idSimDet:HDF1:NDAttributesFile, then I see the correct attribute in the HDF file. 

The documentation [1] makes it sound like I can put the XML directly into the PV and it should also work as long as "<Attributes>" is in the string, but I do not see the attribute in the HDF5 file, and I get an IOC console error "asynNDArrayDriver::readNDAttributesFile error opening file " followed by the XML I put in.

I've also tried putting the XML into the camera's NDAttributesFile PV with similar results, and both with and without the "<?xml ?>" declaration. Any ideas on what I'm doing wrong?

The use case here is that I want Bluesky to include some signals in the AD's HDF file, and also include the right resources in its saved scan entry to find the values later through our data API. Ophyd-async includes support to do this [2] but since my IOC does not let me put the XML into the NDAttributesFile PV, this doesn't work.

Here is the XML:

> <?xml version="1.0" encoding="UTF-8"?>
> <Attributes><Attribute name="sim_det_async-sum" type="EPICS_PV" source="25idSimDet:Stats1:Total_RBV" datatype="DOUBLE" description="Sum of the array" /></Attributes>

Thanks,
Mark

[1] https://urldefense.us/v3/__https://areadetector.github.io/areaDetector/ADCore/NDArray.html*asynndarraydriver__;Iw!!G_uCfscf7eWS!dh0BK5QPgcb-IqTxPFl9IiRRsnBYXRh9MQuybGRWbJh-lrGyjMmjBFSPWaY-MwisKfNGRzLMGIbdenqWWNX2xw$ 
[2] https://urldefense.us/v3/__https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/plan_stubs/_nd_attributes.py__;!!G_uCfscf7eWS!dh0BK5QPgcb-IqTxPFl9IiRRsnBYXRh9MQuybGRWbJh-lrGyjMmjBFSPWaY-MwisKfNGRzLMGIbdenqlXczNSA$ 

---
My work schedule may not be the same as your work schedule. Please 
don't feel obligated to respond to this e-mail outside of your 
normal work hours.

Replies:
Re: Writing XML directly to area detector's NDAttributesFile PV Érico Nogueira Rolim via Tech-talk

Navigate by Date:
Prev: FLIR SpinView on alma 9? John Dobbins via Tech-talk
Next: Using alternative build systems (meson) for IOCs/modules Érico Nogueira Rolim via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
Navigate by Thread:
Prev: Re: FLIR SpinView on alma 9? Joshua Einstein-Curtis via Tech-talk
Next: Re: Writing XML directly to area detector's NDAttributesFile PV Érico Nogueira Rolim via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025