Applying Py6S On Multispectral Imagery

76 views
Skip to first unread message

Pratanu Maity

unread,
Mar 10, 2023, 6:11:39 AM3/10/23
to Py6S
Dear Sir,

I want to convert Satellogic TOA reflectance imagery to surface reflectance imagery using the Py6S tool.

But in the documentation, I am unable to find out how to generate surface reflectance products from any type of TOA multispectral imagery.

Please help me with how to do the same.

Thank You. Regards, 

Pratanu Maity
Geospatial Analyst
Suhora Technologies Pvt.Ltd


afagh zeydani

unread,
Mar 10, 2023, 6:22:59 AM3/10/23
to py...@googlegroups.com
Hello there, 
I have exactly the same problem, 
Sorry can't help you. 

--
You received this message because you are subscribed to the Google Groups "Py6S" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py6s+uns...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/py6s/edf833ea-7314-463e-878a-e6ac62f75f56n%40googlegroups.com.

Robin Wilson

unread,
Mar 10, 2023, 6:28:45 AM3/10/23
to py...@googlegroups.com, afagh zeydani
Hi both,

Py6S is just a wrapper around the underlying 6S model, so it doesn’t have the built-in ability to do atmospheric correction of arbitrary images.

There are other tools that do atmospheric correction but use Py6S ‘under the hood’ to do the radiative transfer calculations - for example ARCSI (https://github.com/remotesensinginfo/arcsi). I’d suggest using these tools to do atmospheric correction if possible (they can be extended to work with other sensors).

The other option is to write your own code for doing atmospheric correction with Py6S. In simple terms, you’d need to:

1. Parameterise Py6S correctly for your image/sensor/time/atmospheric conditions
2. Extract the three atmospheric correction parameters (coef_xa, coef_xb, coef_xc) for each band
3. Load in your image (using something like GDAL or rasterio) and apply the correction formula using those coefficients

That’s the simplest way of doing this, and would result in a uniform correction across the image. Ideally you’d run Py6S multiple times for various atmospheric conditions, and then create a lookup table and interpolate within the lookup table to do atmospheric correction with varying atmospheric information across the image. I actually wrote a paper on why this is important a while back - see https://rtwilson.com/academic/WilsonMiltonNield_2014_SpatVarAtmos_Paper.pdf

By the way, I now do freelance work on various remote sensing topics including Py6S - see www.rtwilson.com for details. If you needed custom atmospheric correction methods implementing then I may be able to do this as paid work.

Hope that helps,

Robin

Pratanu Maity

unread,
Mar 10, 2023, 7:04:38 AM3/10/23
to Py6S
Thank you sir for your answer.

Please can you share an example code that shows how to extract coef_xa, coef_xb, and coef_xc for a single band?

Regards,
Pratanu Maity
Geospatial Analyst
Suhora Technologies Pvt.Ltd.
Reply all
Reply to author
Forward
0 new messages