Opacity Classes

class AttenuatorOptions
bname(*args, **kwargs)

Overloaded function.

  1. bname(self: pyharp.opacity.AttenuatorOptions) -> str

Set or get the name of the band that the opacity is associated with

Parameters:

bname (str) – name of the band that the opacity is associated with

Returns:

class object if argument is not empty, otherwise the band name

Return type:

AttenuatorOptions | str

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().bname('band1')
  1. bname(self: pyharp.opacity.AttenuatorOptions, arg0: str) -> pyharp.opacity.AttenuatorOptions

Set or get the name of the band that the opacity is associated with

Parameters:

bname (str) – name of the band that the opacity is associated with

Returns:

class object if argument is not empty, otherwise the band name

Return type:

AttenuatorOptions | str

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().bname('band1')
fractions(*args, **kwargs)

Overloaded function.

  1. fractions(self: pyharp.opacity.AttenuatorOptions) -> list[float]

Set or get fractions of species in cia calculatioin

Parameters:

fractions (list[float]) – list of species fractions

Returns:

class object if argument is not empty, otherwise the list of species fractions

Return type:

AttenuatorOptions | list[float]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().fractions([0.9, 0.1])
  1. fractions(self: pyharp.opacity.AttenuatorOptions, arg0: list[float]) -> pyharp.opacity.AttenuatorOptions

Set or get fractions of species in cia calculatioin

Parameters:

fractions (list[float]) – list of species fractions

Returns:

class object if argument is not empty, otherwise the list of species fractions

Return type:

AttenuatorOptions | list[float]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().fractions([0.9, 0.1])
jit_kwargs(*args, **kwargs)

Overloaded function.

  1. jit_kwargs(self: pyharp.opacity.AttenuatorOptions) -> list[str]

Set or get the list of kwargs to pass to the JIT module

Parameters:

jit_kwargs (list[str]) – list of kwargs to pass to the JIT module

Returns:

class object if argument is not empty, otherwise the list of kwargs to pass to the JIT module

Return type:

AttenuatorOptions | list[str]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().jit_kwargs(['temp', 'wavelength'])
>>> print(op.jit_kwargs())
  1. jit_kwargs(self: pyharp.opacity.AttenuatorOptions, arg0: list[str]) -> pyharp.opacity.AttenuatorOptions

Set or get the list of kwargs to pass to the JIT module

Parameters:

jit_kwargs (list[str]) – list of kwargs to pass to the JIT module

Returns:

class object if argument is not empty, otherwise the list of kwargs to pass to the JIT module

Return type:

AttenuatorOptions | list[str]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().jit_kwargs(['temp', 'wavelength'])
>>> print(op.jit_kwargs())
opacity_files(*args, **kwargs)

Overloaded function.

  1. opacity_files(self: pyharp.opacity.AttenuatorOptions) -> list[str]

Set or get the list of opacity data files

Parameters:

opacity_files (list) – list of opacity data files

Returns:

class object if argument is not empty, otherwise the list of opacity data files

Return type:

AttenuatorOptions | list[str]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().opacity_files(['file1', 'file2'])
  1. opacity_files(self: pyharp.opacity.AttenuatorOptions, arg0: list[str]) -> pyharp.opacity.AttenuatorOptions

Set or get the list of opacity data files

Parameters:

opacity_files (list) – list of opacity data files

Returns:

class object if argument is not empty, otherwise the list of opacity data files

Return type:

AttenuatorOptions | list[str]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().opacity_files(['file1', 'file2'])
species_ids(*args, **kwargs)

Overloaded function.

  1. species_ids(self: pyharp.opacity.AttenuatorOptions) -> list[int]

Set or get the list of dependent species indices

Parameters:

species_ids (list[int]) – list of dependent species indices

Returns:

class object if argument is not empty, otherwise the list of dependent species indices

Return type:

AttenuatorOptions | list[int]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().species_ids([1, 2])
  1. species_ids(self: pyharp.opacity.AttenuatorOptions, arg0: list[int]) -> pyharp.opacity.AttenuatorOptions

Set or get the list of dependent species indices

Parameters:

species_ids (list[int]) – list of dependent species indices

Returns:

class object if argument is not empty, otherwise the list of dependent species indices

Return type:

AttenuatorOptions | list[int]

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().species_ids([1, 2])
type(*args, **kwargs)

Overloaded function.

  1. type(self: pyharp.opacity.AttenuatorOptions) -> str

Set or get the type of the opacity source format

Valid options are, jit, rfm-lbl, rfm-ck, four-column, wavetemp, multiband. See List of built-in opacity types for more details.

Parameters:

type (str) – type of the opacity source

Returns:

class object if argument is not empty, otherwise the type

Return type:

AttenuatorOptions | str

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().type('rfm-lbl')
>>> print(op)
  1. type(self: pyharp.opacity.AttenuatorOptions, arg0: str) -> pyharp.opacity.AttenuatorOptions

Set or get the type of the opacity source format

Valid options are, jit, rfm-lbl, rfm-ck, four-column, wavetemp, multiband. See List of built-in opacity types for more details.

Parameters:

type (str) – type of the opacity source

Returns:

class object if argument is not empty, otherwise the type

Return type:

AttenuatorOptions | str

Examples

>>> import torch
>>> from pyharp.opacity import AttenuatorOptions
>>> op = AttenuatorOptions().type('rfm-lbl')
>>> print(op)
class FourColumn
__init__()

(self: object, *args, **kwargs) -> None

forward(*input: Any) None

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

input (Any)

Return type:

None

class MultiBand
__init__()

(self: object, *args, **kwargs) -> None

forward(*input: Any) None

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

input (Any)

Return type:

None

class WaveTemp
__init__()

(self: object, *args, **kwargs) -> None

forward(*input: Any) None

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

input (Any)

Return type:

None

class RFM
__init__()

(self: object, *args, **kwargs) -> None

forward(*input: Any) None

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

input (Any)

Return type:

None

class JITOpacity
__init__()

(self: object, *args, **kwargs) -> None

forward(*input: Any) None

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

input (Any)

Return type:

None