-
Notifications
You must be signed in to change notification settings - Fork 0
Stand Alone Tools
This tool uses the equations outlined in the calculating heights from pixel height wiki
Tool usage:
If you have already set up an environment like in https://cemac.github.io/DCMEX2/ you can use that environment; otherwise, to set up an environment:
conda env create -f /gws/nopw/j04/dcmex/users/hburns/DCMEX/DCMEX.yml
conda activate DCMEX
running the tool with no arguments e.g.
/gws/nopw/j04/dcmex/users/hburns/DCMEX/StandAloneTools/height_calculator.py
will return
Usage: python calculate_heights.py <pixels> <distance in km> <pitch in degrees>"
To obtain the pixel go to /gws/nopw/j04/dcmex/users/hburns/images2/image_pairs/<date>
The images will have the pitch and distance in the image titles and the pixel number can be read off the y-axis as is.
Example use:
/gws/nopw/j04/dcmex/users/hburns/DCMEX/StandAloneTools/height_calculator.py 2500 28 14.05
**NB this calculator uses an assumed height of camera of 1450m asl for the asl value **
To set up an environment for the first time:
conda env create -f /gws/nopw/j04/dcmex/users/hburns/DCMEX/DCMEX.yml
conda activate DCMEX
In the future, simply activate the already installed environment.
conda activate DCMEX
This script works by providing a file name to the script located:
/gws/nopw/j04/dcmex/users/hburns/DCMEX/StandAloneTools/Distance_Estimator.py <filename>
run the python script e.g.
python /gws/nopw/j04/dcmex/users/hburns/DCMEX/StandAloneTools/Distance_Estimator.py /gws/nopw/j04/dcmex/data/stereocams/2022-07-31/primary_blue/amof-cam-1-2022-07-31-171057-capt0004.jpg
this uses absolute paths but will work with relative paths as well or
export DCMEXpth=/gws/nopw/j04/dcmex/users/hburns/DCMEX/export cldimgpth=/gws/nopw/j04/dcmex/data/stereocams/2022-07-31/primary_blue/amof-cam-1-2022-07-31-171057-capt0004.jpgpython $DCMEXpth/Distance_Estimator.py $cldimgpth
This will bring up a python plot with the photos nearest associated GOES image with distance rings plotted and an X showing the max optical depth found, if you wish to save the plot save via the python GUI