Project

General

Profile

Setup Ptolemy CLI for exposure targeting » History » Revision 2

Revision 1 (Anchi Cheng, 03/15/2022 01:20 PM) → Revision 2/3 (Anchi Cheng, 03/15/2022 01:25 PM)

h1. Setup Ptolemy CLI for exposure targeting 

 This shell script needs to take three arguments 

 1. output json rootname.    Leginon will assign this according to the session name and node alias calling this.    For example, "22mar15a_Exposure_Targeting" 
 2. full input mrc file path. Leginon will assign this according to its session path.    For example "/data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc" 
 3. output directory name. Leginon will assign this to the directory where Leginon is launched, assuming write assess of the user.    For example, "/home/your_name" 

 Here is an example script used at SEMC 

 <pre> 
 #!/bin/sh -f 
 # Local runs 
 source /usr/local/anaconda3/etc/profile.d/conda.sh 
 conda activate /opt/condaenvs/ptolemy_env 
 echo $1 
 echo $2 
 echo $3 
 python /home/your_name/packages/ptolemy/medmag_cli.py -f json -o $3/$1.json $2 
 conda deactivate 
 </pre> 

 h3. Testing example 

 Assuming you have /data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc, and call the above script hl_finding.sh you can test with 

 <pre> 
 hl_finding.sh my_test /data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc . 
 </pre> 
 You should get my_test.json written in your current directory. 

 During leginon operation, the output json will be read by Leginon into memory and be replaced each time it is run.