Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #!/bin/bash 
0002 usage(){ cat << EOU
0003 cxr_overview.sh
0004 ================
0005 
0006 ::
0007 
0008    ~/o/CSGOptiX/cxr_overview.sh  
0009 
0010 
0011 For some views its good to remove large container volumes::
0012 
0013     epsilon:CSGOptiX blyth$ ~/opticks/bin/lvn.sh 142,143,94
0014     /Users/blyth/.opticks/GEOM/V1J009/CSGFoundry/meshname.txt
0015     142  143  sBottomRock
0016     143  144  sWorld
0017     94   95   sTarget
0018 
0019 
0020 ::
0021 
0022    GDB=gdb    ./cxr_overview.sh 
0023    GDB=lldb__ ./cxr_overview.sh 
0024 
0025 On workstation, make renders::
0026 
0027    EMM=0, ./cxr_overview.sh 
0028    EMM=1, ./cxr_overview.sh 
0029 
0030 From laptop, grab renders and metadata from workstation::
0031 
0032    SCAN=scan-emm ./cxr_overview.sh  
0033    SCAN=scan-elv ./cxr_overview.sh 
0034 
0035 On laptop, create time ordered lists of jpgs and txt tables::
0036 
0037    ./cxr_overview.sh jstab
0038 
0039    SELECTSPEC=all SCAN=scan-elv SNAP_LIMIT=512 SNAP_ARGS="--jpg --out --outpath=/tmp/elv_jpg.txt" ./cxr_overview.sh jstab
0040    SELECTSPEC=all SCAN=scan-elv SNAP_LIMIT=512 SNAP_ARGS="--txt --out --outpath=/tmp/elv_txt.txt" ./cxr_overview.sh jstab
0041 
0042    open -n $(cat /tmp/elv_jpg.txt)   ## open all jpg in time order 
0043    vim -R /tmp/elv_txt.txt           ## view txt table to see the ELV exclusion names
0044 
0045 
0046    SELECTSPEC=all SELECTMODE=all SCAN=scan-emm SNAP_ARGS="--jpg --out --outpath=/tmp/emm_jpg.txt" ./cxr_overview.sh jstab
0047    SELECTSPEC=all SELECTMODE=all SCAN=scan-emm SNAP_ARGS="--txt --out --outpath=/tmp/emm_txt.txt" ./cxr_overview.sh jstab
0048 
0049    open -n $(cat /tmp/emm_jpg.txt)    ## to avoid Preview.app splitting into multiple windows exit Preview.app first 
0050    vim -R /tmp/emm_txt.txt
0051    cp /tmp/emm_txt.txt ~/j/issues/cxr_scan_cxr_overview_scan_emm.txt 
0052 
0053 
0054 
0055 
0056 
0057 * cxr_overview.sh render times with JUNO 
0058 
0059 JUNO (trunk:Dec, 2021)
0060    without   0.0054 
0061 
0062 JUNO (trunk:Mar 2, 2022)
0063 
0064    without  0.0126
0065    WITH_PRD 0.0143
0066    without  0.0126
0067    without  0.0125  
0068    WITH_PRD 0.0143   (here and above WITH_PRD used attribs and payload values at 8 without reason)
0069    WITH_PRD 0.0125   (now with attribs and payload values reduced to 2)
0070    WITH_PRD 0.0124  
0071 
0072    WITH_PRD not-WITH_CONTIGUOUS 0.0123
0073 
0074 
0075 EOU
0076 }
0077 
0078 
0079 cd $(dirname $(realpath $BASH_SOURCE))
0080 
0081 case $(uname) in 
0082   Linux) defarg="run" ;;
0083   Darwin) defarg="grab_open" ;; 
0084 esac
0085 arg=${1:-$defarg}
0086 
0087 source $HOME/.opticks/GEOM/GEOM.sh  # exports GEOM envvar selecting geometry 
0088 
0089 escale=extent
0090 moi=ALL       # formerly -1
0091 tmin=0.4
0092 eye=-0.6,0,0,1
0093 icam=0
0094 zoom=1.5
0095 
0096 
0097 export ESCALE=${ESCALE:-$escale}
0098 export MOI=${MOI:-$moi} 
0099 export TMIN=${TMIN:-$tmin} 
0100 export EYE=${EYE:-$eye}
0101 export ICAM=${ICAM:-$icam} 
0102 export ZOOM=${ZOOM:-$zoom}
0103 
0104 export QUALITY=90 
0105 export OPTICKS_GEOM=cxr_overview
0106 
0107 #[ "$(uname)" == "Darwin" ] && emm=1, || emm=t8,
0108 
0109 emm_all=t0        # tilde zero     : (without comma so this is whole number spec)  meaning ~0 (ie 0xffffffff...) for ALL
0110 emm_noglobal=t0,  # tilde 0-th bit : (with comma meaning single bitindex spec) meaning exclude solid 0 (global) 
0111 emm_no8=t8,       # tilde 8-th bit : exclude solid 8 
0112 emm=$emm_all
0113 
0114 elv=t
0115 export EMM=${EMM:-$emm}
0116 export ELV=${ELV:-$elv}
0117 ## CAUTION: EMM(SBit) and ELV(SBitSet) lingos similar, but not the same. TODO: unify them  
0118 
0119 export NAMEPREFIX=cxr_overview_emm_${EMM}_elv_${ELV}_moi_      # MOI gets appended by the executable
0120 export OPTICKS_RELDIR=cam_${ICAM}_tmin_${TMIN}       # this can contain slashes
0121 
0122 stamp=$(date +"%Y-%m-%d %H:%M")
0123 version=$(CSGOptiXVersion 2>/dev/null)
0124 
0125 export TOPLINE="./cxr_overview.sh    # EYE $EYE MOI $MOI ZOOM $ZOOM stamp $stamp version $version done" 
0126 export BOTLINE=" GEOM $GEOM RELDIR $OPTICKS_RELDIR NAMEPREFIX $NAMEPREFIX SCAN $SCAN "
0127 
0128 if [ -z "$SCAN" ]; then 
0129    vars="BASH_SOURCE stamp version TOPLINE BOTLINE"
0130    for var in $vars ; do printf "%20s : %s \n" $var "${!var}" ; done
0131 fi
0132 
0133 source cxr.sh $arg
0134