Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-harmonics
Commits
8f80d1b2
Commit
8f80d1b2
authored
Jul 17, 2025
by
Andrea Paris
Committed by
Boris Bonev
Jul 21, 2025
Browse files
added docstring
parent
c44d2d9e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
torch_harmonics/random_fields.py
torch_harmonics/random_fields.py
+21
-0
No files found.
torch_harmonics/random_fields.py
View file @
8f80d1b2
...
@@ -33,6 +33,27 @@ import torch
...
@@ -33,6 +33,27 @@ import torch
from
.sht
import
InverseRealSHT
from
.sht
import
InverseRealSHT
class
GaussianRandomFieldS2
(
torch
.
nn
.
Module
):
class
GaussianRandomFieldS2
(
torch
.
nn
.
Module
):
"""
Gaussian random field on the sphere.
Parameters
----------
nlat : int
Number of latitudinal modes.
alpha : float, optional
Exponent of the power spectrum.
tau : float, optional
Cutoff scale of the power spectrum.
sigma : float, optional
Standard deviation of the power spectrum.
radius : float, optional
Radius of the sphere.
grid : str, optional
Grid type.
dtype : torch.dtype, optional
Data type.
"""
def
__init__
(
self
,
nlat
,
alpha
=
2.0
,
tau
=
3.0
,
sigma
=
None
,
radius
=
1.0
,
grid
=
"equiangular"
,
dtype
=
torch
.
float32
):
def
__init__
(
self
,
nlat
,
alpha
=
2.0
,
tau
=
3.0
,
sigma
=
None
,
radius
=
1.0
,
grid
=
"equiangular"
,
dtype
=
torch
.
float32
):
super
().
__init__
()
super
().
__init__
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment