Difference between revisions of "Extract Angle Cam Image from CODA files"

From HallCWiki
Jump to: navigation, search
(BONUS CREDITS)
(BONUS CREDITS)
Line 24: Line 24:
 
* I will buy lunch for any student that integrates the image decoder into an hcana class so that the angle images just get stored in the ROOT tree as JPGs as part of the standard analysis run. The encoded image format is described in the get_coda_photos script.  Talk to me if you have questions though.
 
* I will buy lunch for any student that integrates the image decoder into an hcana class so that the angle images just get stored in the ROOT tree as JPGs as part of the standard analysis run. The encoded image format is described in the get_coda_photos script.  Talk to me if you have questions though.
  
 +
 +
Offer below is on-hold for now (June 21, 2022).  Managed to talk some summer students into taking a shot at this.  We'll see how it goes :-)
 +
<s>
 
* I will give $100 to anyone who manages to get some decent ML character and feature recognition that can *reliably* extract the spectrometer angle from the camera image.  This includes recognizing the angle digits and correctly interpreting the vernier.
 
* I will give $100 to anyone who manages to get some decent ML character and feature recognition that can *reliably* extract the spectrometer angle from the camera image.  This includes recognizing the angle digits and correctly interpreting the vernier.
 
** Let's say it should work correctly on 19/20 (different) images.  (Can't just be copies of the same angle snapshot though.)
 
** Let's say it should work correctly on 19/20 (different) images.  (Can't just be copies of the same angle snapshot though.)
 
** Note that you can take advantage of the fact that the image frame is fixed, the graduations have fixed spacing, and the camera center (from which the vernier is interpreted) never moves.  Don't overthink the problem -- some hardcoded parameters are entirely fine (but do describe them and store them in a config file!)
 
** Note that you can take advantage of the fact that the image frame is fixed, the graduations have fixed spacing, and the camera center (from which the vernier is interpreted) never moves.  Don't overthink the problem -- some hardcoded parameters are entirely fine (but do describe them and store them in a config file!)
 +
</s>

Revision as of 15:39, 21 June 2022

SHMS and HMS Angle Cam Images in CODA files

The angle camera images are stored at the start of every CODA run. They can be extracted using the /home/coda/coda/scripts/Angle_snapshots/get_coda_photos tool.

This script uses evio2xml to support extracting the image so you will need to run it in a place that has access to the coda tools. There are lots of ways to do this, but the simplest is to just login to cdaq@cdaql1.

Login to the cdaq cluster, cd into an appropriate directory, and make a symlink of the script here:

 % ln -s /home/coda/coda/scripts/Angle_snapshots/get_coda_photos .

Or copy the script if you want:

 % cp /home/coda/coda/scripts/Angle_snapshots/get_coda_photos .

The basic syntax is "./get_coda_photos <coda_file.dat>". It will extract the angle-cam images into your current working directory. For example:

 ./get_coda_photos  /cache/hallc/spring17/raw/coin_all_07977.dat

Generates:

 SHMS_angle_07977.jpg, and
  HMS_angle_07977.jpg

If you are in a directory with symlinks to raw/, cache/, etc, then you can just give it the filename and it will search the usual list of paths automatically like the analyzer does:

 ./get_coda_photos coin_all_07977.dat

BONUS CREDITS

Feature bounties offered by Brad:

  • I will buy lunch for any student that integrates the image decoder into an hcana class so that the angle images just get stored in the ROOT tree as JPGs as part of the standard analysis run. The encoded image format is described in the get_coda_photos script. Talk to me if you have questions though.


Offer below is on-hold for now (June 21, 2022).  Managed to talk some summer students into taking a shot at this.  We'll see how it goes :-)

  • I will give $100 to anyone who manages to get some decent ML character and feature recognition that can *reliably* extract the spectrometer angle from the camera image. This includes recognizing the angle digits and correctly interpreting the vernier.
    • Let's say it should work correctly on 19/20 (different) images. (Can't just be copies of the same angle snapshot though.)
    • Note that you can take advantage of the fact that the image frame is fixed, the graduations have fixed spacing, and the camera center (from which the vernier is interpreted) never moves. Don't overthink the problem -- some hardcoded parameters are entirely fine (but do describe them and store them in a config file!)