Adding Support for arbitrary point distributions on the sphere, as from DSE paper #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have added several files and functions.
examples/train_fno_dse.py
provides the option to load two different models and train them via two slightly different functions. The models areSFNODSEFp
andSFNODSEVp
(SFNO using Discrete Spectral Evaluations with Fixed/Variable Points). "Fixed points" means sampling locations are fixed across all training data, while "Variable points" means that the sampling locations are different between the samples.The spherical harmonics transformed is performed by the class
RealSHTDSE
for fixed points andBatchedRealSHTDSE
for variable points. These are both found intorch_harmonics/sht_dse.py
. These classes must be initialized with the set of points and number of degrees for the SHT. They contain functions to perform both the forward and backward transform. The backward transform is not an inverse. Actually, the backward transform will return a field with values that differ from the original field by some constant. This can be by about an order of magnitude. For the purposes of operator learning, this was actually not an issue, since some scaling of the SHT coefficients is learned. I never bothered to fix this, but if someone is hoping to use this package strictly for "inverse" SHT on an arbitrary point distribution, this might not work for them.The models for the SFNO on arbitrary points are found in
examples/sfno_dse/models
.