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 2024 | 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 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Attributes XML problems |
From: | Hinko Kocevar <[email protected]> |
To: | Mark Rivers <[email protected]>, "[email protected]" <[email protected]> |
Date: | Wed, 16 Aug 2017 18:39:34 +0000 |
Hi Hinko,
I'm glad that it's working. I'm curious why HDF5 was not working with ADCore 2-5. It should only have failed if the PV could not connect. Is it possible that was the problem, or should the PV have connected successfully?
Mark
From: Hinko Kocevar [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 11:31 AM
To: Mark Rivers; [email protected]
Subject: Re: Attributes XML problems
Thanks a lot.
After updating from 2-5 to latest git release it is much better. No more issues with HDF5 and I can see that updating XML works.
Cheers,
Hinko
On Wed, 16 Aug 2017 at 13:23, Mark Rivers <[email protected]> wrote:
Hi Hinko,
What version of ADCore are you using?
This is from the R3-0 RELEASE.md file: https://github.com/areaDetector/ADCore/blob/master/RELEASE.md
************************
Fixed a problem with PVAttributes that were not connected to a PV. Previously this generated errors from the HDF5 library because an invalid datatype of -1 was used. Now the data type for such disconnected attributes is set to H5T_NATIVE_FLOAT and the fill value is set to NAN. No data is written from such attributes to the file, so the fill value is used.
************************
This looks might it be the problem you are having, but it should only occur if the PV cannot connect.
> On a related note, can I replace the attribute XML during IOC runtime (while acq is stopped) through 13ANDOR1:cam1:NDAttributesFile PV?
> I would like to edit to add new attributes witout restarting the IOC if possible..
Yes, that is possible. Note that when you read a new XML file it can add new attributes, but it will normally not delete any existing attributes because they are still attached to the NDArray in the NDArrayPool. This is explained in this documentation:
http://cars.uchicago.edu/software/epics/areaDetectorDoc.html#NDAttribute<http://cars.uchicago.edu/software/epics/areaDetectorDoc.html#NDAttribute>
************************
The NDAttributeList implements a linked list of NDAttribute objects. NDArray objects contain an NDAttributeList which is how attributes are associated with an NDArray. There are methods to add, delete and search for NDAttribute objects in an NDAttributeList. Each attribute in the list must have a unique name, which is case-sensitive.
When NDArrays are copied with the NDArrayPool methods the attribute list is also copied.
IMPORTANT NOTE: When a new NDArray is allocated using NDArrayPool::alloc() the behavior of any existing attribute list on the NDArray taken from the pool is determined by the value of the global variable eraseNDAttributes. By default the value of this variable is 0. This means that when a new NDArray is allocated from the pool its attribute list is not cleared. This greatly improves efficiency in the normal case where attributes for a given driver are defined once at initialization and never deleted. (The attribute values may of course be changing.) It eliminates allocating and deallocating attribute memory each time an array is obtained from the pool. It is still possible to add new attributes to the array, but any existing attributes will continue to exist even if they are ostensibly cleared e.g. asynNDArrayDriver::readNDAttributesFile() is called again. If it is desired to eliminate all existing attributes from NDArrays each time a new one is allocated then the global variable eraseNDAttributes should be set to 1. This can be done at the iocsh prompt with the command:
var eraseNDAttributes 1
The NDAttributeList class documentation<http://cars.uchicago.edu/software/epics/areaDetectorDoxygenHTML/class_n_d_attribute_list.html> describes this class in detail.
************************
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Hinko Kocevar [[email protected]]
Sent: Wednesday, August 16, 2017 4:59 AM
To: [email protected]
Subject: Attributes XML problems
Hi,
I'm trying to set some attributes using XML. If I want to have PV as source HDF5 file saving plugin complains heavily. If I use the parameter as source it is OK.
Example when fine:
<?xml version="1.0" standalone="no" ?>
<!-- Attributes -->
<Attributes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../ADCore/XML_schema/NDAttributes.xsd"
>
<Attribute name="CameraManufacturer" type="PARAM" source="MANUFACTURER" datatype="STRING" description="Camera manufacturer"/>
<Attribute name="CameraModel" type="PARAM" source="MODEL" datatype="STRING" description="Camera model"/>
<Attribute name="ImageCounter" type="PARAM" source="ARRAY_COUNTER" datatype="INT" description="Image counter"/>
<Attribute name="MaxSizeX" type="PARAM" source="MAX_SIZE_X" datatype="INT" description="Detector X size"/>
<Attribute name="MaxSizeY" type="PARAM" source="MAX_SIZE_Y" datatype="INT" description="Detector Y size"/>
<Attribute name="AcquireTime" type="PARAM" source="ACQ_TIME" datatype="DOUBLE" description="Camera acquire time"/>
</Attributes>
Example when bad:
<?xml version="1.0" standalone="no" ?>
<!-- Attributes -->
<Attributes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../ADCore/XML_schema/NDAttributes.xsd"
>
<Attribute name="CameraManufacturer" type="PARAM" source="MANUFACTURER" datatype="STRING" description="Camera manufacturer"/>
<Attribute name="CameraModel" type="PARAM" source="MODEL" datatype="STRING" description="Camera model"/>
<Attribute name="ImageCounter" type="PARAM" source="ARRAY_COUNTER" datatype="INT" description="Image counter"/>
<Attribute name="MaxSizeX" type="PARAM" source="MAX_SIZE_X" datatype="INT" description="Detector X size"/>
<Attribute name="MaxSizeY" type="PARAM" source="MAX_SIZE_Y" datatype="INT" description="Detector Y size"/>
<Attribute name="AcquireTimePV" type="EPICS_PV" source="13ANDOR1:cam1:AcquireTime_RBV" dbrtype="DBR_NATIVE" description="Camera acquire time"/>
</Attributes>
HDF5 file saving complaints:
epics> HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5Pdcpl.c line 3225 in H5Pset_fill_value(): not a datatype
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5D.c line 123 in H5Dcreate2(): not a datatype ID
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 265 in H5Acreate2(): not a location
major: Invalid arguments to routine
minor: Inappropriate type
#001: ../H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 634 in H5Awrite(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 1655 in H5Aclose(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 265 in H5Acreate2(): not a location
major: Invalid arguments to routine
minor: Inappropriate type
#001: ../H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 634 in H5Awrite(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 1655 in H5Aclose(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 265 in H5Acreate2(): not a location
major: Invalid arguments to routine
minor: Inappropriate type
#001: ../H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 634 in H5Awrite(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 1655 in H5Aclose(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 265 in H5Acreate2(): not a location
major: Invalid arguments to routine
minor: Inappropriate type
#001: ../H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 634 in H5Awrite(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5A.c line 1655 in H5Aclose(): not an attribute
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5D.c line 908 in H5Dset_extent(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5D.c line 375 in H5Dget_space(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5Shyper.c line 6888 in H5Sselect_hyperslab(): not a data space
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5Dio.c line 225 in H5Dwrite(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5S.c line 433 in H5Sclose(): not a dataspace
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 139869132080896:
#000: ../H5D.c line 334 in H5Dclose(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
Any ideas?
On a related note, can I replace the attribute XML during IOC runtime (while acq is stopped) through 13ANDOR1:cam1:NDAttributesFile PV? I would like to edit to add new attributes witout restarting the IOC if possible..
Thanks,
Hinko
--
.. the more I see the less I believe.., AE AoR