== Processing the InfraTec IR8300 data == The data are in ascii files with a .asc extension. They have 3 sections, the first 2 containing metadata and the 3rd containing the image data. The procedure to process the data is: * convert asc to tif files for easier managing / tagging using {{{convert_infratec_to_tif.sh}}} * tag the images with the navigation information using {{{get_nav_for_infratec_image.py}}} After this the images are ready to be geocorrected with APL using the photo geocorrection methodology, using {{{photo_geocorrection.py}}} There is a helper script {{{infratec_quick_run.sh}}} and container {{{process_infratec}}} that can be used to make this a little easier, but loses some functionality of the individual scripts. == Instructions for container method == Build the container if it doesn't already exist (it does!) by using the {{{make_docker.sh}}} script and the {{{-I}}} flag. Then run it with the following inputs: {{{ COMPULSORY -i = input directory of asc files from Infratec instrument -o = output directory where tifs and geocorrected imagery goes -s = SBET file of navigation to tag to images -c = the config file for the geocorrection OPTIONAL -d = delete the intermediate geocorrection files -r = rotate the Infratec imagery by 180 degrees -T = input data are TIFF format files }}} It's important that the container can see the drives where the data are - if not in the user home space or /tmp then you must bind the drives to the container. This is easiest done by exporting the global variable SINGULARITY_BIND, e.g. to add the arsf data you may mount like this: {{{export SINGULARITY_BIND="/users/rsg/arsf/arsf_data/:/users/rsg/arsf/arsf_data/}}} The command then can be run: {{{ process_infratec.sif -i /users/rsg/arsf/arsf_data/2022/flight_data/uk/GB22_02-2022_230_Alconbury/thermal/infratec/ImageIR_8300/220818_151730_line14 \ -o /tmp/quickouts/ \ -s /users/rsg/arsf/arsf_data/2022/flight_data/uk/GB22_02-2022_230_Alconbury/posatt/applanix/proc/sbet_2022230.out \ -c photo_geocorrection.cfg \ -d \ -r }}} == Geocorrection config file == For doing the photograph geocorrection you need to create a config file based from the template at: {{{internal-code/tools/frame_camera_tools/photo_geocorrection.cfg}}} A very basic example will look like this: {{{ [DEFAULT] [navdata] run: false [aplcorr] run: true exe: aplcorr vvfile: /users/rsg/arsf/calibration/2022/infratec/infratec_vv.bil boresight: 0 0 0 dem: /users/rsg/arsf/arsf_data/2022/flight_data/uk/GB22_02-2022_230_Alconbury/processing/hyperspectral/dem/GB22_02-2022_230-SRTM.dem [apltran] run: true exe: apltran projstr: EPSG:32630 [aplmap] run: true exe: aplmap }}} == Creation of view vectors or running scripts independently == If view vectors don't exist for the camera then you can create some using the {{{make_camera_vv.py}}} script. You will need a camera parameter config file such as the examples in {{{internal-code/tools/frame_camera_tools/parameter_files}}}. To run this within the singularity container you can open a shell in it: {{{singularity shell /tmp/process_infratec.sif}}} and then run e.g., {{{make_camera_vv.py --help}}} or in docker it'll be something like: {{{docker exec -it bash}}} == Running scripts individually == This may be necessary if you don't want to use the basic automated workflow, for instance to work from files other than in the ascii format. Go into a shell (see above) and then run the scripts individually. These are: {{{/usr/bin/convert_infratec_to_tif.sh}}} convert the ASCII to TIFFs and copy the metadata into XMP tags {{{/usr/bin/get_nav_for_infratec_image.py}}} Tag the TIFFs with the Navigation information {{{/usr/bin/make_camera_vv.py}}} Generate view vector file for the camera based on given parameters {{{/usr/bin/photo_geocorrection.py}}} Geocorrect the TIFF images You can also run the APL tools within this container.