EOIR Cloud Modeling Demo

« Go Back

Information

 
QuestionHow can I automate EOIR for cloud modeling?
Answer

Modeling clouds and understanding their effects on a mission is imperative for mission modeling. EOIR has the capability to model these effects, and Python and MATLAB enable you to automate, process, and analyze the results.

The scripts in this article highlight how to connect to a scenario and generate data, all while changing EOIR properties in your STK scenario. The specific properties changed in each run are the EOIR Atmospheric and Cloud settings. The script returns a bitmap and text file for each synthetic scene frame.  

 

EOIR Cloud Air to Air Scenario

In this scenario, two aircraft are flying in different directions. One aircraft (southbound) has a visible and a thermal (LWIR) camera on board. The cameras point to and image the cross-flight aircraft (eastbound). The cross-flight aircraft has a mesh file: Boeing-757.obj; Max Dimensions: 70 m; Temperature 273 K.

You can design your own missions in STK using the article How to Model Clouds in EOIR.


Image of two flights
 

EOIR_Image_Generation.ipynb

You can make this with the Python API available in STK 12.1 and later.

Once you build and open the scenario, you can use a Python script with connect commands to automate data generation. The script connects to an open scenario. It has a few functions; see the comments in the script. Specify the cloud and atmosphere properties for STK to use to define the file location for the generated data. The script cycles through cloud and atmosphere properties and generates a BMP file and a text file for each time step using the predefined animation times and timesteps. Once you generate the data, STK can process it.

Dependencies

• STK 12.2 and earlier licenses: Pro, Integration, EOIR
• STK 12.3 and later licenses: at least STK Premium
• Other scripts: N/A
• Scenario: EOIR Cloud Air To Air Scenario
 

Images_to_video.ipynb

This is a do-it-yourself solution to stack all the images to a video. Since this is a repeated action, AGI has automated it. The script reads in a directory of images, resizes them, reorders them (only needed if stacking the BMP files), and then writes them to a video file.

Dependencies

• Licenses: N/A
• Other Scripts: EOIR_Image_Generation.ipynb
• Scenario: N/A
 

Video of all synthetic scenes


First Frame of all EOIR Syn Scenes

MATLAB helper functions (available upon request)

The bitmap shows you what the data looks like, depending on the scenario. Between frames, the color scale may vary. That’s because the data has automatic gain control, which means the data in the text file needs to be normalized to show a balanced image. The get_sequence_states function generates a graph of all the maxima and minima of the images. Decide the best boundary (maximum and minimum values) to use in the normalization script.

files = dir('.../*.txt')
get_sequence_stats(files)


create_normalized_frame_sequence(input_folder,output_folder,normalize_to_first,colormap_to_use,scale_up_factor)

The create_normalized_frame_sequence function uses the specified minima and maxima to normalize the data in the text files. These are the values that were selected based on the get_sequence_stats graph. Change the fields (or specify it as an input, if available) to define the minimum and maximum values.

min_value = 0.0e+10;
max_value = 7.0e+10;


The script also calls related functions. They are available upon request. The output files are JPG images. You can stack these to make a video.
 

TitleEOIR Cloud Modeling Demo
URL NameEOIR-Cloud-Modeling-Demo

Related Files

EOIR Cloud Scenario