Sunteți pe pagina 1din 22

Aaron Ahue Kahikina O Ka L: Summer Internship Program Pacific Defense Solutions:

Problem: Ground based observational telescopes are dependent upon human interaction to ensure proper operations and monitoring of equipment. Solution: Scripting files can be used to provide Autonomous capabilities:

Control system Monitor environmental conditions Without the need for Human interaction.

Pacific Defense Solutions PDS, received a Astrohaven clamshell Dome to protect a 20-in telescope system Create an autonomous system: Integrate system with active autonomous software and equipment Intended for customers in remote locations without the need for a physical presence Customer US Air Force Academy:
Provide systems for educational purposes:
Grade school college level academics US Air Force Research & Laboratories

Control telescope equipment Monitor weather conditions

USER

Initialize System: Remote Location

Boltwood Cloud Sensor II

Stores Environmental Readings to Log File


Parses Log File Compares readings to bad weather thresholds Calls Python Script to Open Dome if conditions are safe Begins Telescope Operations Initiates Startup by controlling: Hardware: Telescope mount, camera, and filter-wheel Software: GPSTFP timing, Sky-X Pro

Falcon Exec

Orchestrate

Falcon Exec: Monitors weather conditions every 30 sec and can issue a close dome command

System Tasked for Observations

System provided with tasking Files with coordinates of objects


Tasking Completed Bad Weather Conditions Calls Python Script to Close Dome

System Shutdown

Astrohaven Clamshell Dome 12 Ft

20-inch Telescope
Filterwheel

Paramount ME Mount for Telescope


Software:
Falcon Raven Exec Sky-X Pro Orchestrate GPSTFP Python Open & Close Scripts

U47 Camera

Diameter:
12 Feet

Opening & Closing Dome:


1 side at a time 2-inch increments with each command sent

Problems:
Dome opens by sending ASCII characters over a serial COM port RS-232 standard Protocol Commands sent from a keyboard on the control computer:
1 key-stroke at a time not automated

Start

Read Serial COM Port Data

DELAY 2 Sec

Store Data to variable Data


TRUE

While Data x

FALSE

Print Data

Read Serial COM Port Data

DELAY 2 Sec

Write a (97) ASCII to Serial COM Port Open South Side of Dome

0 = BOTH SIDES CLOSED 3 = BOTH SIDES OPEN aOPEN (SOUTH) 2 in bOPEN (NORTH) 2 in x = South Side of Dome Fully Open y = North side of the Dome Fully Open

DELAY 2 Sec

Read & Serial COM Port Data

DELAY 2 Sec

Store Data to variable Data2

While Data2 y

FALSE

TRUE

End

Print Data

Read & Serial COM Port Data

DELAY 2 Sec

Write b (98) ASCII to Serial COM Port Open South Side of Dome

0 = BOTH SIDES CLOSED 3 = BOTH SIDES OPEN aOPEN (SOUTH) 2 in bOPEN (NORTH) 2 in x = South Side of Dome Fully Open y = North side of the Dome Fully Open

Python Script to Close Dome

Same Flow Chart as Open Dome Script


Except:
While-loop checks for capital X and Y Writes capital A and B
0 = BOTH SIDES CLOSED 3 = BOTH SIDES OPEN A CLOSE (SOUTH) 2 in B CLOSE (NORTH) 2 in X = South Side of Dome Fully Closed Y = North side of the Dome Fully Closed

Wind speed & velocity: Rain Humidity Clouds Dew Point:


Speed: Rate of motion per unit of time Magnitude component of wind Velocity: Magnitude component with direction of the wind

Ambient Sky Temperature: Sky Temperature:

This is the temperature at which dew (or frost) will form on surfaces From the sensor near the ground: serves as an approximation

for the near ground temperature

= 0: :

Falcon Exec successfully:


Checks Weather Conditions Interfaces with Python Open Dome Script Open dome Initiates Orchestrate to task the system Tasks the system properly for observations:
Telescope able to slew to proper coordinates Takes Pictures of Objects Stores data properly

Continually monitors weather conditions:


Hazards Produces proper flags

Problem:

Initiates shutdown process and closes programs Successfully closes Astrohaven dome to protect equipment System freeze on final command after closing

Dome Falcon Exec code modification:


Restart processes when weather is optimal

Python Image Processing Script Context:


Problem: Manual processing of data collected from telescopes requires users to issue commands to an image processing algorithm:
Large amounts of time - many hours Huge amounts of data - 100s of GBs

Solution:

Create a Python script to automate the process

Manual Procedure for Data Processing:


Executable files with image processing algorithm stored on

computer Data to process stored in a folder with subdirectories on a server Empty folders created in directory on computer:
Topology identical to folder that actual data is stored in

Move a file with processing information to a processing

information folder on the computer Issue image processing start command in a command prompt Copy files into corresponding folders

C:

COPY

Server
Data Files Main Folder
MOVE

Processing
Main Folder

Information directory

Information
File

Cmd: Issue processing command


Set 1 Set 2
Set 1 Set 2

COPY

COPY

Start

Set Source & Destination Directory Location

Os.walk Source Directory Lists: Paths/Dir/Files

Os.walk Destination Directory Lists: Paths/Dir/Files

For: Directories in Source Directory


True

False

For: Files in Source Directory


False

True

Check: If files are certain type: .fits


False

True

Store File in ListA

Check: If Directory in Destination Directory


True

False

Create Processed Directory in destination Create Error Directory in destination

Skip File

Skip Directory

Create Directory in destination

Open Cmd Prompt

Issue Processing Command

For: Files in ListA


False

True

Check: If file is certain size: >500KB


False

True

Store File in ListB

Count Files To-be Process in ListB


Create Variable for Count ToBe Processed Count

Move File to Error Directory

Store File in ListC


True

Copy elements of ListB to destination folder

For: Files in Destination Folder


False

True

Check: If file ends: .jpg and begins with prefix: image

False

Skip File

Image Processing Begins and produces image files

Initialize Processed Files Count = 0

While: To-Be Processed count Processed Count ListC


False

True

Count Processed Files

Store Processe d Files Count

Print Counts: To-Be Processed Files & Processed Files

Code exits main For loop


Move Processed Files to Finished Processing Folders

Repeat Code for Set 2

End

Code executes tasks correctly:


Problems:

Copies directories to destination Issues commands to process images Copies files to correct locations Processes image files Checks for proper counts of processed files Moves files to proper folders

Files too small for image processing: Resolved with size check Moving files to Error folder Order in which files are copied & moved produced errors during

processing:

Code edited:
Order copying and moving fixed Code undergoing further tests

Python script to open and close Astrohaven dome Integrated script with Falcon Exec software Implemented autonomous software with hardware systems of telescope Created automated python script to process large amounts of data Understanding of list comprehension Directory and file manipulation

Falcon Exec code modification to re-start system after emergency shut-down Further testing for errors in processing script

Pacific Defense Solutions:


Mentors: Daron Nishimoto Vicky Sensano Kawai Kuluhiwa Dylan Schwarzmeier Laurie Hozaki

Kahikina O Ka L Program:
Coordinators: Damien Cie Tracie Takatani Kristi Ishikawa