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

Subject: Re: Question for areaDetector overlay and file plugin
From: Jörn Dreyer via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 18 Jun 2025 11:56:55 +0200
Hi Edmund,

here is a short answer and some points to consider:

Am Mittwoch, 18. Juni 2025, 11:35:37 Mitteleuropäische Sommerzeit schrieb Blomley, Edmund (IBPT) via Tech-talk:
> Dear all,
> 
> I have some quick questions regarding areaDetector plugins:
> 
> 1. Overlay plugin: If I use a text label I can change the font based on 4
> different options. Is there a way to scale the size in addition to that? For
> our images, the label is very small.
>      1a. If not, I would need to modify the font selection part in the
> overlay module to provide larger font sizes? Is that something which is
> reasonable to do? Helpful for any hints of how to approach this
> 
> 2. File plugin: For the filename (:FileName) or file name format
> (*:FileTemplate), can I somehow use time-format variables ("%Y-%m-%d") to
> add the current date to the file name?
>     2a. If not, I would probably create a new "save" button, which would
> re-write the filename based on the current date? Or are there other options?

Taking a quick look at the NDPluginFile.ccp gives a hint that the filename is constructed using asynNDArraDriver::createFileName.
Looking at the implementation reveals that you have to give the filename pattern exactly as shown on the GUI. Otherwise the code will crash.

If you want to have the date and time included in your filename, the simplest way would be to create your own plugin that overwrites 
NDPluginFile::openFileBase. This function will be called for each file to be opened. It will call the openFile function of the file plugin (e.g. HDF5File).

Just adding another button is not fail save! What if you forget to press the button before starting to write? What if you write files in auto increment mode?

Regards

Jörn



Replies:
RE: Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) via Tech-talk
References:
Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) via Tech-talk

Navigate by Date:
Prev: Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) via Tech-talk
Next: RE: Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) 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  2024  <2025
Navigate by Thread:
Prev: Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) via Tech-talk
Next: RE: Question for areaDetector overlay and file plugin Blomley, Edmund (IBPT) 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  2024  <2025
ANJ, 18 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·