EPICS Controls Argonne National Laboratory

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  <20152016  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Increment array counter for NDFileModeSingle
From: Mark Rivers <[email protected]>
To: "'Hinko Kocevar'" <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 18 Mar 2015 15:01:18 +0000

Hi Hinko,

 

The array counter in the NDPluginFile plugin is intended to be a count of the actual number of arrays written to disk, not the number of callbacks received by the plugin.  Moving the arrayCounter++ before the if would violate this, since then it would increment even if the array was not saved if autosave was false and the Save button was not pressed for each array.

 

We could increment the array count each time that Save button is pressed in single mode.  That would be preferable, but would have the problem that one can save the same array multiple times with the Save button, and then array count is misleading, since it is counting the same array multiple times.

 

Note that in an upcoming R3-0 release of ADCore we propose to do a major re-write of NDPluginFile to simplify things.  This is documented here:

 

https://github.com/areaDetector/ADCore/issues/73

 

This is the proposed change:

 

*******************************************************************

Currently NDPluginFile has the following controls:

FileWriteMode: [Single, Stream, Capture]

Autosave: Automatically save each image in Single mode or the entire capture buffer in Capture mode.

Save: Saves the last array received in Single mode or saves the entire capture buffer in Capture mode

NumCapture: Number of frames to capture or stream

Capture: Start/stop saving files in Capture mode or start/stop streaming files to disk in Stream mode.

These controls are not intuitive, many users get confused. They also add a lot of complexity to the NDPluginFile base class. The Capture mode functionality (saving NDArrays in a memory buffer) is now available in the NDPluginCircularBuff plugin.

Proposed change:

Eliminate FileWriteMode

Eliminate Autosave

Eliminate Capture

Retain Save, it will start/stop file saving

Rename NumCapture to NumSave. It defines the total number of NDArrays to save. If it is <=0 then file saving will continue until Save is set to 0.

Add NumArraysPerFile. It defines the number of NDArrays per file.

With these changes the number of arrays per file can be defined independently of the total number of arrays to save. This allows saving single arrays per file with HDF5 and netCDF, for example which is not currently possible.

This change will require changes to many clients so it will need to be a major release of ADCore.

*******************************************************************

 

I would appreciate any comments on this proposed change.

 

Mark

 

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hinko Kocevar
Sent: Wednesday, March 18, 2015 9:26 AM
To: [email protected]
Subject: Increment array counter for NDFileModeSingle

 

Hi,

 

In areaDetector NDPluginFile I noticed that the array count is incremented only if autosave is active (if in Single mode). This means that by clicking ‘Save’ button the array counter is not incremented. Is there a reason for this?

 

See https://github.com/areaDetector/ADCore/blob/master/ADApp/pluginSrc/NDPluginFile.cpp#L708.

 

By moving arrayCounter++ before the if() would a way to have array counter incremented even if autosave is not active.

 

Best regards,

Hinko


Replies:
Re: Increment array counter for NDFileModeSingle Hinko Kocevar
References:
Increment array counter for NDFileModeSingle Hinko Kocevar

Navigate by Date:
Prev: Increment array counter for NDFileModeSingle Hinko Kocevar
Next: RE: Base 3.14.12.5-rc1 Available freddie.akeroyd
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Increment array counter for NDFileModeSingle Hinko Kocevar
Next: Re: Increment array counter for NDFileModeSingle Hinko Kocevar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·