class_docstr: Test the pyspectral-based Rayleigh correction modifier.
docstr: Test PSPRayleighReflectance with angles provided.
docstr_tok: ["Test","PSPRayleighReflectance","with","angles","provided","."]
code: def test_rayleigh_with_angles(self, as_optionals):
      """Test PSPRayleighReflectance with angles provided."""
      from satpy.modifiers.atmosphere import PSPRayleighReflectance
  
      aerosol_type = "rayleigh_only"
      ray_cor = PSPRayleighReflectance(
          name="B01",
          atmosphere="us-standard",
          aerosol_types=aerosol_type,
      )
      prereqs, opt_prereqs = self._get_angles_prereqs_and_opts(
          as_optionals
      )
      with mock.patch(
          "satpy.modifiers.atmosphere.get_angles"
      ) as get_angles:
          res = ray_cor(prereqs, opt_prereqs)
      get_angles.assert_not_called()
  
      assert isinstance(res, xr.DataArray)
      assert isinstance(res.data, da.Array)
  
      data = res.values
      unique = np.unique(data[~np.isnan(data)])
      np.testing.assert_allclose(
          unique,
          np.array([-75.0, -37.71298492, 31.14350754]),
          rtol=1e-5,
      )
      assert data.shape == (3, 5)
  
imports: import unittest
  from datetime import datetime
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition, StackedAreaDefinition
  from pytest_lazyfixture import lazy_fixture
label_desc: Use image node_id 4 for calling the TestPSPRayleighReflectance obj's underlying member method code with example usage: obj.test_rayleigh_with_angles(as_optionals) without return types