User Tools

Site Tools


atmos:software:matlab:phips_classifier

Crystal Habit Classification

Cloud Particle Imager (CPI) Classifier using MATLAB

Our CPI classification system uses the software was developed for the PHIPS. The software is located on the Aircraft server. Best to use a VNC connection to access the software. Different flights can be classified.

January 15, 2023 IMPACTS Flight (15:25:40 - 16:24:03)

1. Working Directory: /nas/und/NorthEast/2023/Aircraft/P3_N426NA/FlightData/20230115_1/Analysis/cpi_indivi_images_test/20230115_FL1608_Classification

  • Type cd, and above directory following.
  • Note that you need images in directory YYYYMMDDHHMMSS_C1 and YYYYMMDDHHMMSS_C1 these contain ROI files. These ROI come from CPI software. For example, 20230115161313_C1 and 20230115161313_C2. To check use:
  • ls -d 20230115160712_C*
    • 20230115160712_C1 20230115160712_C2

2. Run the software:

  • Type matlab in terminal.
    • Expand window so everything is visible.

3. In Current Folder, select PHIPS_Image_Classifier_8_2.mlapp file.

  • Right click and select 'Run' option.
  • Click on “Choose Folder for PHIPS Data” button
    • The current folder should already be select, which is
      • /nas/und/NorthEast/2023/Aircraft/P3_N426NA/FlightData/20230115_1/Analysis/cpi_indivi_images_test/20230115_FL1608_Classification
    • Click “Open” button.

4. In 2: “Classifier” Use Last_Data, such as Delene_20240711

  • This is used for the filename of where classification file is saved.

5. In 3: Select Button “Load Existing Classification” or “Make New Classification”

  • Next to Save Button has the file name with your last name.
  • Using Software
  • No is default Attributes.
  • Quit
  • Save
  • X to kill.

Problems/Solutions

  • Can't click buttons, error in the code “Variable/function not recognised.”
    • You have not chosen a file to save your data. Check back to steps 2 and 3.

Starting to Classify

  • Look over the sources at the top of this page. They will give you a basic understanding of what to look for.
  • On your screen, you will see the types on the right, confidence level on the bottom, next/previous buttons bellow the types, and special qualities below them.
  • As you have already chosen a data file, you should see 2 black and white pictures. With knowledge from the sources, look to see if there are any special qualities.
  • Before moving on to classification, select your confidence level.
  • Select the classification of the crystal. For single crystals, it will automatically move on to the text photo once a classification is selected.
    • If Aggregate: You will have to press the “hold” button to choose multiple classifications based on what the aggregate consists of. The different types will not show up in the classification text box, but they are being registered.
  • Note: be careful and aware when classifying. The program tends to skip images FREQUENTLY. Press previous to make sure you have classifyed the previous image if you observe a skip.

Particle Habit Imaging and Polar Scattering probe (PHIPS) Classifier using MATLAB

This software was developed by Dr. Emma Jarvinen (jarvinen@ucar.edu) and Dr. Martin Schnaiter (martin.schnaiter@kit.edu) and provides an easy-to-use interface for classifying images of particles taken by the PHIPS instrument.

For this walk through, we will be displaying PHIPS data using this software from the 07/25/2019 Flight from the Capeex19 project on 'Aircraft'.

  • First, if you're working remotely, open up a VNC session on aircraft (if you're not working remotely you can simply SSH into 'Aircraft'). If you're not sure how to do this, click this link and follow the steps there: http://wiki.atmos.und.edu/doku.php?id=atmos:citation:soft:vnc&s[]=vnc
  • Once a VNC session is up and running or you established your SSH connection, move into the following directory:
    cd /nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PHIPS_Data
  • Next, open matlab from your terminal in the directory you are currently in:
    matlab
  • It should take a few seconds, but matlab should successfully open up. The matlab software will have three main windows: Command Window, Current Folder Window, and a Workspace Window. In the Current Folder window, scroll down until you see a file named: PHIPS_Image_Classifier_7.mlapp. Double click that file and a new window containing the PHIPS classification software will pop up.
  • Next, click on the orange button on the upper left of the PHIPS classifier software window that says: “Choose Folder for PHIPS Data”. Do not choose a specific folder (The software will not work), instead just click “Open” when you're in the PHIPS_Data directory. Now, go back to the PHIPS Classification software and you shall see images being displayed on both the C1 and C2 windows.

When classifying an image, you must selected the appropriate attributes in the bottom left corner of the software window before finalizing the particle type on the 'Selection' area on the mid-to-upper right side of the software window. Once you have decided the appropriate attributes and finalized your decision as to what type of particle is being displayed, the next image will pop up automatically.

Once done with classifying several images, you can save your work (or work-in-progress) by selecting the red save icon on the top of the software window. This will automatically save your classifications into your current directory as a txt file.

  • Once your file is saved, open up a new terminal and return to the directory you were in when you opened matlab.
  • You must rename your image classification file by adding your name to the file. Other people may be working on classifications too, and this will solve any confusion as to whose file is whose.
    mv PhipsData_20190725-1759_Image_Classification.txt PhipsData_20190725-1759_Image_Classification_<lastname>.txt

Combining (C1 & C2) & Time-stamping the PHIPS Images

In order to combine the C1 & C2 PHIPS images you must have the CoPAS ADPAA repository installed in your home directory. For more information on how to install ADPAA click on the following link: http://aerosol.atmos.und.edu/DataProcessingGuide.pdf

Once the repository is installed, you now can combine your PHIPS images. In continuation with our example, we will do a walk through on combining the PHIPS images from the 20190725_17413 flight. Go to the following directory where your PHIPS data is located.

cd /nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PHIPS_Data 

From here, make sure you have your PHIPS data in this current directory as well as two text files (*0000_C1.txt & *0000_C2.txt). These files are necessary for the combine_PHIPS_Images.py ADPAA python script to read in the accurate time information.

Now, we can run combine_PHIPS_images.py in the current directory (PHIPS_Data directory):

combine_PHIPS_Images.py

Depending on how many images you have this may take awhile. When completed you should now have new directories named *_C1-C2 for the corresponding bins.

atmos/software/matlab/phips_classifier.txt · Last modified: 2024/10/17 13:58 by post