Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:02

0001 #!/bin/bash -l 
0002 usage(){ cat << EOU
0003 image_grid.sh
0004 ===============
0005 
0006 Create list of jpg using eg::
0007 
0008     cx
0009     ./grabsnap.sh --jpg --out --outpath /tmp/ana_snap.txt 
0010     ./grabsnap.sh --jpg --out
0011          ## uses default outpath of /tmp/ana_snap.txt 
0012 
0013     ./grabsnap.sh --jpg --reverse --out --selectspec not_elv_t --outpath /tmp/ana_snap.txt
0014 
0015     SNAP_LIMIT=64 ./grabsnap.sh --jpg --reverse --out --selectspec not_elv_t --outpath /tmp/ana_snap.txt
0016 
0017 
0018 Note that default maximum open files on macOS appears to be only 256 
0019 
0020 
0021 This makes an enormous image in memory before scaling back to the size of the input images::
0022 
0023     epsilon:CSGOptiX blyth$ ./image_grid.sh 
0024     INFO:__main__:all_paths 137 all_anno 0 grid.shape (12, 12) 
0025     INFO:__main__:IMG.downsize factor 12 from width 23040 height 12960 to dwidth 1920 dheight 1080 
0026     INFO:__main__:save to /Users/blyth/.opticks/geocache/DetSim0Svc_pWorld_g4live/g4ok_gltf/41c046fe05b28cb70b1fc65d0e6b7749/1/CSG_GGeo/CSGOptiXRenderTest/cvd1/70000/cxr_overview/cam_0_tmin_0.4/image_grid_elv_scan.jpg 
0027     epsilon:CSGOptiX blyth$ 
0028 
0029 
0030 The save path is based on the path of the first image.
0031 
0032 EOU
0033 }
0034 
0035 
0036 make_image_grid()
0037 {
0038     local outstem=$1
0039     local pathlist=$2
0040     local annolist=$3
0041 
0042     export ANNOTATE=1    
0043     export OUTSTEM=$outstem
0044 
0045     ${IPYTHON:-ipython} -- ~/env/doc/image_grid.py $pathlist $annolist
0046 }
0047 
0048 
0049 
0050 jpglist=$HOME/j/issues/scan_elv_jpg_select.txt
0051 JPGLIST=${JPGLIST:-$jpglist}
0052 GRIDSTEM=$(basename $JPGLIST)
0053 
0054 if [ -f "$JPGLIST" ]; then 
0055     make_image_grid "$GRIDSTEM" $JPGLIST
0056 else
0057     echo $BASH_SOURCE : MISSING REQUIRED JPGLIST $JPGLIST 
0058 fi 
0059 
0060 
0061 
0062