> For the complete documentation index, see [llms.txt](https://support.senterasensors.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.senterasensors.com/home/sentera-calibrated-reflectance-panel/sentera-calibrated-reflectance-panel/calibration-imagery-post-processing/python-usage-development.md).

# Python Usage/Development

## Installation&#x20;

<details>

<summary>Installation Instructions</summary>

{% stepper %}
{% step %}

### Install Miniconda

Choose the correct option for your computer.

{% embed url="<https://docs.conda.io/en/latest/miniconda.html>" %}
{% endstep %}

{% step %}

### Open Anaconda Prompt (miniconda3)

Open the Anaconda Prompt application

<figure><img src="/files/8MTv7j0YIXG1t0TAbRfM" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Clone py-radiometric-corrections

```
git clone https://github.com/SenteraLLC/py-radiometric-corrections.git
```

<figure><img src="/files/DZXIgCGeUwDPpvW5aWI4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Navigate to py-radiometric-corrections/

```
cd py-radiometric-corrections/
```

<figure><img src="/files/wx3jziAvRCIZzdeLkzef" alt="" width="478"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Run The Following Commands <a href="#run-the-following-commands" id="run-the-following-commands"></a>

This creates an imgcorrect-venv environment that all scripts should be run in and installs the analyticstest library for the scripts to reference. If no errors appear, the imgcorrect library should be installed correctly.

```
conda env create -f environment.yml
```

<figure><img src="/files/VbkpdB0XDuffKFr3eQCt" alt=""><figcaption></figcaption></figure>

```
conda activate imgcorrect-venv
```

<figure><img src="/files/CrInV6Vphyh9WWRJqDqU" alt=""><figcaption></figcaption></figure>

```
pip install .
```

{% hint style="info" %}
Change hint settings\
you may need to add --user at the end of the install command.
{% endhint %}

<figure><img src="/files/ef3mqVm8lZ6OAkpCmGhP" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Installation Complete.&#x20;

This creates an *imgcorrect-venv* environment that all scripts should be run in and installs the **analyticstest** library for the scripts to reference.

If no errors appear, the **imgcorrect** library should be installed correctly.
{% endstep %}
{% endstepper %}

</details>

## Instructions

{% hint style="info" %}
Use local data folders when running the proceesing scripts.
{% endhint %}

{% stepper %}
{% step %}

### Open Anaconda Prompt and navigate to py-radiometric-corrections/.

```
cd py-radiometric-corrections/ 
```

<figure><img src="/files/k1adCQvOPL3LBXcLL8I7" alt="" width="469"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Activate Environment

```
conda activate imgcorrect-venv 
```

<figure><img src="/files/SYQu0vRKFXtHevy21Iq2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Get Required Arguments

```
 python scripts\correct_images.py -h  
```

<figure><img src="/files/Ai61bD5rQwolYQkTYbDf" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Run Corrections

```
python scripts\correct_images.py "input_path" --output_path "output_path" 
```

<figure><img src="/files/3x1cg9NZlqgSxCYjE3Va" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
