s.outputs.XX<TAB> doesn't work

40 views
Skip to first unread message

Mengmeng Yang

unread,
Apr 27, 2021, 5:20:26 AM4/27/21
to Py6S
Hi Robin,

I want to print and plot the outputs of 6S including at least apparent reflectance, Rayleigh reflectance, and transmittances for the whole wavelength range of an airborne sensor. So I tried to check the output data names by running s.outputs.tra<TAB> and s.outputs<TAB>. For the former running, I got nothing, and for the latter one, I got just s.outputs. But when I ran s.a<TAB>, I got the same results as that in the Py6S document.

So I wonder why s.outputs.tra<TAB> and s.outputs<TAB> doesn't work on my PC (ubuntu on mac os)? And how to check the output names of SixS()?

Thank you in advance.
Kind regards,
Mengmeng.

Robin Wilson

unread,
Apr 27, 2021, 5:33:56 AM4/27/21
to py...@googlegroups.com
Hi,

You need to make sure you've run the 6S model with `s.run()` before you try and look at the outputs - the autocompletion won't work until the model has been run. Also, to get a full list of all of the possible names that can go after `s.outputs` you need to type `s.outputs.` and then press tab (notice the trailing dot).

To get a full list of all of the output names, you can run `dir(s)` (making sure you've run `s.run()` first).

Robin
--
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/53ec356e-4fc4-4fa1-b0e9-3910b8384240n%40googlegroups.com.

Mengmeng Yang

unread,
Apr 27, 2021, 5:52:06 AM4/27/21
to Py6S
Hi Robin,

Thank you for your reply. Now I can get a full list of all of the possible names. But when I ran dir(s) after running s.run(), I got some names which seemed to be not like the output names. dir(s).png

So I wonder dir(s) is not the code I should run?

Kind regards,
Mengmeng.

Robin Wilson

unread,
Apr 27, 2021, 6:33:53 AM4/27/21
to py...@googlegroups.com
Hi,

Yes, dir gives you all of the attributes on a Python object. Some of them are internal Python attributes, which are signified by starting with underscores.

Also, you should be running `dir(s.outputs)` rather than `dir(s)` - sorry, that was my mistake in my last email.

Robin
10bc8d15-f356-47c1-8cef-a723024affa9.png

Mengmeng Yang

unread,
Apr 27, 2021, 7:12:28 AM4/27/21
to Py6S
I see, thanks.

Kind regards,
Mengmeng.

Mengmeng Yang

unread,
Apr 27, 2021, 9:44:51 PM4/27/21
to Py6S
Hi Robin,

I didn't find the description of the output names. So I am not sure what are 'atmospheric_intrinsic_reflectance' and 'pixel_reflectance'? What is the difference between 'apparent_radiance' and 'atmospheric_intrinsic_reflectance'? Is 'reflectance_I' the atmospherically corrected reflectance with taking into account polarization effect?

It may be possible to understand the meaning of the output names from the 6S document, however, I have not understood that document well yet. So could you answer my questions above?

Thank you in advance.
Kind regards,
Mengmeng.

在2021年4月27日星期二 UTC+9 下午7:33:53<ro...@rtwilson.com> 写道:
Reply all
Reply to author
Forward
0 new messages