mraspaud/mpop — pull request #8 by pnuu (2014-02-21 10:25:05+00:00)
Title: Sun zenith angle correction added.

This function let's the user to perform Sun zenith angle correction. Currently only cosine correction is supported, but a placeholder argument is in place for possible future additions.

The function returns a new channel object with a new self.name. It also adds the new name as self.info['sun_zen_corrected'] of the original channel.

So far it is for the user to modify image composites to use the new channel names (or replace the original data with the return value of this function).

# Arguments
* **time_slot**: *datetime.datetime()* object that defines the time used for Sun zenith angle calculations (uses pyorbital.astronomy)
* **lons**, **lats**: pre-loaded coordinates for the angle calculations. If None, will be read via the *channel.area.get_lonlats()* method.
* **limit**: zenith angle limit (in degrees) for the maximum correction. For larger angles, *cos(limit)* is used.
* **name**: name of the new channel. If None, *original_channel.name+'_SZC'* will be used. This name is also stored in the *info* dict of the original channel with key *'sun_zen_corrected'*.
* **mode**: placeholder for possible other zenith angle corrections. By default, *1/cos(theta)* is used (*mode='cos'*).