Skip to content

Additional spin tilt distributions

Reed Essick requested to merge additional-spin-tilt-distributions into master

This patch defines a few additional spin tilt distributions. It also defines transforms to take polar spin components into cartesian spin components.

Fixes #37 (closed).

Newly implemented Classes:

AttributeTransforms:

  • add chi_p to PolarSpins2Chi (take definition from arxiv:2104.09508)
  • PolarSpin2CartesianSpin
  • CartesianSpin2PolarSpin

SamplingDistributions:

  • TruncatedGaussianSpinPolarAngle
  • TruncatedGaussianSpinCosPolarAngle
  • PowerLawSpinPolarAngle
  • PowerLawSpinCosPolarAngle

Additional functionality:

  • Refactoring into Spin1 and Spin2 distributions that share code, variates through class inheritance

Tests:

  • write tests of new transforms
    • CartesianSpin2PolarSpin
    • PolarSpin2CartesianSpin
    • PolarSpins2Chi
    • CartesianSpins2Chi
  • write tests of new distributions and refactor existing spin tests to work on individual Spin1 vs Spin2 distributions as well as over Spin1Spin2 distributions
    • IsotropicSpin1AzimuthalAngle
    • IsotropicSpin2AzimuthalAngle
    • IsotropicSpin1PolarAngle
    • IsotropicSpin2PolarAngle
    • AlignedSpin1PolarAngle
    • AlignedSpin2PolarAngle
    • TruncatedGaussianSpin1PolarAngle
    • TruncatedGaussianSpin2PolarAngle
    • TruncatedGaussianSpin1CosPolarAngle
    • TruncatedGaussianSpin2CosPolarAngle
    • PowerLawSpin1PolarAngle
    • PowerLawSpin2PolarAngle
    • PowerLawSpin1CosPolarAngle
    • PowerLawSpin2CosPolarAngle
    • BetaDistributedSpin1PolarAngle
    • BetaDistributedSpin2PolarAngle
    • BetaDistributedSpin1CosPolarAngle
    • BetaDistributedSpin2CosPolarAngle
    • ZeroSpin1Magnitude
    • ZeroSpin2Magnitude
    • PowerLawSpin1Magnitude
    • PowerLawSpin2Magnitude
    • PowerLawSpin1z
    • PowerLawSpin2z
    • ZeroCartesianSpin1
    • ZeroCartesianSpin2
    • AlignedPowerLawCartesianSpin1
    • AlignedPowerLawCartesianSpin2
    • IsotropicPowerLawCartesianSpin1
    • IsotropicPowerLawCartesianSpin2
  • update all help strings to completely describe distributions/transforms

n.b.: ZeroCartesianSpin1Spin2, AlignedPowerLawCartesianSpin1Spin2, and IsotropicPowerLawCartesianSpin1Spin2 are not directly tested, but they rely on classes that are tested.

Edited by Reed Essick

Merge request reports

Loading