Skip to content

Extension

Stephanie Lu edited this page Nov 17, 2022 · 23 revisions

Architect is designed to support easy extension of the core systems library. This page will explain how. Follow the environment setup instructions in the README before starting.

The general workflow for introducing extensions is roughly:

  1. Create a new branch off main
  2. Make your changes
  3. Create a pull request
  4. Profit! 💸

Add new LUT files

To add a new LUT file follow these steps.

  1. Navigate to architect/luts .
  2. Select the folder that correctly describes the LUT you would like the add. Currently there are two folders, architect/luts/sensors and architect/luts/atmosphere .
  3. Create a new .csv and give it a name that describes the LUT well.
  4. If the quantities represented by the LUT have units, write these units as the the header row of the file. For example, the quantum efficiency LUT for a camera sensor might look something like this:
nm %
800 0
1000 82
1200 84
1400 82

Add new systems

To add a new system, follow these steps:

  1. Document the mathematical equations that define the system in UTAT's Mathematical Modelling database.
  2. Navigate to the Class Diagram for Systems.
  3. Determine the parent and child classes of your system. Update the diagram with your new system.
  4. Navigate to architect/systems.
  5. Select the folder that classifies the system appropriately.
  6. Select or create a .py file that classifies the system appropriately.
  7. Create a new System class in the .py file.
    • Initialize relevant properties of the system as data members of the class.
    • Define relevant mathematical properties of the system as methods of the class.

Note: Navigate to architect/systems/optical/foreoptics.py to see an example of a System class and modules that should be imported.

Create a tradebook

To create a new tradebook, follow these steps:

  1. Navigate to architect/tradebooks.
  2. Create a new .ipynb file. You may also duplicate the template.ipynb file to start with a template.
    • Make necessary imports from the standard library, external imports (shown below), and the project
    • In "Setup", update the constants and variables used in the pipeline as parameters, and instantiate the systems needed for the pipeline.
    • Create the pipeline for tradeoff analysis.
    • Create the plot.

Accessing

Example tradebook

The "Tradebook for Mapping of Wavelengths onto Sensor Face" can be found at architect/tradebooks/sensor_wavelength_mapping.ipynb. It plots sensor height as a function of wavelengths in the SWIR range.

The first time running a tradebook, click "Run All" to execute all cells. Parameters can be updated in their respective cell, and a plot with the new parameter value will be generated when the "Setup" and "Pipeline" sections are run.

Clone this wiki locally