Spectro-Polarimeter Characterization and Control

Software Design

 

Code Overview
Centeral Program Code
ASD Code
Ocean Optics Code
Rotation Stage Code
Telescope Mount Code

 

Code Overview

 

 The code for this project will run four seperate components in one final program. These components are:

 

 The language used for this task is C++ due to its compatability with all the equiment and the existance of pre-existing example code that was able to be modified and used for our system. Each of the compoents, as well as the centeral code to combine them together, are described below.

 

 The image below shows the basic GUI that is being used. More input options will be added to this as the program grows, but the basic look will stay the same.

 

 

Code GUI

 

 

Centeral Program Code

 

 The centeral code in the program will connect all the modules and pull data from each when needed. A basic flow chart of how this code will work is below. The modules called in the flowchart are described in detail in the next sections.

 

 

Centeral Flowchart

 

 

ASD Code

 

 Using an SDK from ASD Inc code was written that could send commands to and recieve data from the ASD spectrometer. This was done with the help of included example code that came with the SDK. The data read from the ASD is output on the graph shown on the GUI and to a CSV file, which will be read later in MATLAB. A basic flowchart of the code is shown below.

 

 

ASD/Ocean Flowchart

 

 

Ocean Optics Code

 

 The code for the Ocean Optics spectrometer is written using the Ocean Optics software Omnidriver. The command structure is very similar to that of the ASD code, and allows sending commands to and recieving data from the Ocean Optics Spectrometer. Data will again be output to a CSV file. The flowchart from the previous section also describes this section of code.

 

Rotation Stage Code

 

 The rotation stage is run by sending ASCII commands to a serial port. The commands will tell the motor to rotate a certain amount, and other commands will be used to keep a status on when the rotation is finished. The flowchart for the rotation stage is below.

 

 

ASD/Ocean Flowchart

 

 

Telescope Mount Code

 

 The telescope mount also runs by sending ASCII commands to a serial port, just like the rotation stage, so the same basic code is used here. Commands are sent to point the mount to a certain posistion, then other commands are used to keep track of when the mount reaches the desired location.

 

 Additionaly, the mount requires coordiantes in the equatorial system, but for ease of use the user needs to be able to enter coordinates in the altitude-azimuth system. The conversion equations for this are in the code and quickly change the coordinates to the required system. A flowchart showing the entire telescope mount system code is shown here.

 

 

ASD/Ocean Flowchart