![]() |
cacao
Release 0.1.03-dev
Compute And Control For Adaptive Optics
|
Creates a sym link from an existing stream to a new stream. This is frequently used to connect to hardware (for example pointing aol8_wfsim to the WFS camera stream).
Within AOCCE, setting (new) stream aol::_<deststream> to point to <srcstream> involves:
The corresponding commands, to point aol8_wfsim to imcam, would be:
echo "imcam" > conf/streamlink_wfsim.name.txt rm /tmp/aol8_wfsim.im.shm ln -s /tmp/imcam.im.shm /tmp/aol8_wfsim.im.shm
This is implemented in script :
./aolfuncs/aolfunc_StreamLink
Loading FITS file into a new or existing stream.
The recommended command to load a FITS image to shared memory in AOCCE is for example:
echo "./wfsref0/wfsref0_today.fits" > ./conf/shmim_wfsref0.name.txt Fits2shm -c -p aol${LOOPNUMBER}_ wfsref0
This command will skip loading if the stream does not need to be updated from the last load command. Add the -f option to force loading.
Options used:
-c read FITS file name from ./conf/shmim_<streamname>.name.txt directory -p <pref> stream prefix
File name can be :
Command for option A:
Fits2shm <FITS file> <stream>
Command for option B:
Fits2shm -c <stream>
A prefix is usually added to the shared memory file with the -p option:
Fits2shm -c -p aol8_ <stream>
The -r removes/clears any previous instance of the stream and associated files: it is a stronger option than -f.
Fits2shm is located in the src/scripts/ directory of the AOCCE source code.
For both options, FITS files and shared memory files are inspected to assess need to load the image. If repetitive load requests are issued on the same file and shared memory, the script may decide that no action is required as the shared memory is already up-to-date.
Local directory ./loadedSM/ is used to keep track of streams loaded from FITS files.
Important files:
File Description
./loadedSM/<stream>.FITSinfo FITS file name, size, time of last modification
./loadedSM/<stream>.FITSinfo.old previous version of above file - to be used for comparison
./loadedSM/<stream>.FITSsame File exists if the two FITS files are identical
./loadedSM/<stream>.FITSchanged File exists if the two FITS files are different
./loadedSM/<stream>.SMinfo stream file name, size, time of last modfification
./loadedSM/<stream>.SMinfo.old previous version of above file - to be used for comparison
./loadedSM/<stream>.SMsame File exists if the two SM files are identical
./loadedSM/<stream>.SMchanged File exists if the two SM files are different
./loadedSM/<stream>.imsize Image size - updated upon SM load
./loadedSM/<stream>.new File exists if last load request updated or created stream
./loadedSM/<stream>.kept File exists if last load request kept stream unchanged
./loadedSM/<stream>.missing File exists if last load request created new stream (stream was missing)
./conf/shmim_<stream>.name.txt FITS file name for stream
./conf/shmim_<stream>.imsize.txt Stream size
./conf/shmim_<stream>.fits (symbolic link to) FITS file
./tmp/<prefix><stream>.im.shm File-mapped shared memory
The logic behind Fits2shm is as follows:
When loading :