Project

General

Profile

Setup Ptolemy CLI for exposure targeting » History » Version 2

Anchi Cheng, 03/15/2022 01:25 PM

1 1 Anchi Cheng
h1. Setup Ptolemy CLI for exposure targeting
2
3
This shell script needs to take three arguments
4
5
1. output json rootname.  Leginon will assign this according to the session name and node alias calling this.  For example, "22mar15a_Exposure_Targeting"
6
2. full input mrc file path. Leginon will assign this according to its session path.  For example "/data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc"
7
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"
8
9
Here is an example script used at SEMC
10
11
<pre>
12
#!/bin/sh -f
13
# Local runs
14
source /usr/local/anaconda3/etc/profile.d/conda.sh
15
conda activate /opt/condaenvs/ptolemy_env
16
echo $1
17
echo $2
18
echo $3
19
python /home/your_name/packages/ptolemy/medmag_cli.py -f json -o $3/$1.json $2
20
conda deactivate
21
</pre>
22
23 2 Anchi Cheng
h3. Testing example
24
25
Assuming you have /data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc, and call the above script hl_finding.sh you can test with
26
27
<pre>
28
hl_finding.sh my_test /data/leginon/22mar15a/rawdata/22mar15a_00001hl.mrc .
29
</pre>
30
You should get my_test.json written in your current directory.
31
32 1 Anchi Cheng
During leginon operation, the output json will be read by Leginon into memory and be replaced each time it is run.