Modify Polymer scripts for CASI-1500 data

Post Reply
Mengmeng
Posts: 38
Joined: Fri Mar 19, 2021 12:10 am
company / institution: Taishan University
Location: Taian, Shandong, China

Modify Polymer scripts for CASI-1500 data

Post by Mengmeng »

Hello François,

As I wrote to you before, I want to apply the Polymer algorithm to my airborne data, i.e., the CASI-1500 data.

So far, I have calculated the parameters for the initial correction of the CASI-1500 reflectance (or radiance). The parameters include the total transmission of ozone (toz), Rayleigh reflectance (ρmol), direct transmission (T0), sunglint reflectance (ρgli), and the total transmission for atmospheric scattering (t).
By the way, I calculated these parameters only for one pixel inside my data and will apply them to the whole image. This may be different from what you did for the atmospheric correction of satellite images. Actually, I want to calculate these parameters for each pixel and then do per-pixel atmospheric correction. But for now, I want to do simple atmospheric correction of CASI-1500 data with Polymer.

For the next step, I want to apply the Polymer algorithm to my data. May I ask a question about how to modify the Polymer scripts? I am sorry that my question is not specific, because I have a difficulty to understand all the Polymer scripts. Could you tell me where to start and what should I modify?

Thank you in advance.
Kind regards,
Mengmeng.
Mengmeng
Posts: 38
Joined: Fri Mar 19, 2021 12:10 am
company / institution: Taishan University
Location: Taian, Shandong, China

Re: Modify Polymer scripts for CASI-1500 data

Post by Mengmeng »

Hello François,

To modify the Polymer scripts, maybe I can start with the codes after intial atmospheric correction. For example, for a given pixel radiance value from my CASI-1500 data, I can do initial correction with the parameters, such as total ozone transmittance, Rayleigh reflectance, direct transmission and sunglint reflectance, that I already calculated. Then, I need to combine the codes for the Polymer algorithm and water reflectance model that you used.

Could you make a script for deriving the water-leaving reflectance after initial correction based on the pixel radiance value?

By the way, I read your scripts, such as polymer_cli.py, example.py and main.py, but I think it needs much work to modify all the scripts for my purpose as I am a beginner of python. So I am writing to ask for a favor.

Thank you in advance.
Kind regards,
Mengmeng.
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Modify Polymer scripts for CASI-1500 data

Post by fsteinmetz »

Hi Mengmeng,

Sorry I don't fully understand your question - It looks like your goal is quite different from what is done in Polymer. The initial corrections would have to be deeply modified, because the basic assumptions are not valid for airborne data: not measuring at the top of atmosphere would deeply change the gaseous, rayleigh corrections and required radiative transfer simulations. I am not sure that starting with the Polymer code is the best strategy in your case, especially since you are a beginner in python. You need a dedicated reader for your airborne data, and a different method for your atmospheric correction. Could cou clarify what you are expecting to use from the Polymer code exactly ?

Cheers,
François
Mengmeng
Posts: 38
Joined: Fri Mar 19, 2021 12:10 am
company / institution: Taishan University
Location: Taian, Shandong, China

Re: Modify Polymer scripts for CASI-1500 data

Post by Mengmeng »

Hi François,

I'm sorry for your confusion. My goal is to apply Polymer to my airborne data (CASI-1500). For now, the only difference that I wanna make to Polymer is the initial atmospheric correction, for which I used the 6SV ratiative transfer model which is able to simulate atmospheric parameters at the airborne alitude. So I wonder how to modify Polymer for the initial atmospheric correction with the 6SV model?

In the polymer_main.pyx file, I didn't find the codes for the initial atmospheric correction. Could you tell me where are the related codes?

In addition, my CASI-1500 data is in .pix format and it is the radiometric corrected radiance data. So can I modify this code in the polymer_cli.py file as below?
parser.add_argument('-fmt', choices=['hdf4', 'netcdf4', 'pix', 'autodetect'], default='autodetect',
help='Output file format')

Thank you.
Kind regards,
Mengmeng.
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Modify Polymer scripts for CASI-1500 data

Post by fsteinmetz »

Hi Mengmeng,

If you are referring to the Rayleigh correction, it is implemented in polymer/main.py:InitCorr.rayleigh_correction
I guess you would have to interpoate your look-up table along a new dimension "altitude", or "pressure".

As for the pix format, I have never encountered this format, so unfortunately I cannot give advice.
Anyway, the way to implement a new reader is to create a dedicated module following all modules named polymer/Level1_*.py

Cheers,
François
Post Reply