Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify access to common classes and functions #40

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 34 additions & 15 deletions herculens/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
"""
from .info import version_info, __version__, __author__, __license__

This file initializes the coolest module
and provides some basic information about the package.
from .Coordinates.pixel_grid import PixelGrid
from .Instrument.psf import PSF
from .Instrument.noise import Noise

"""
from .LightModel.light_model import LightModel
from .LightModel.Profiles.gaussian import Gaussian
from .LightModel.Profiles.multipole import Multipole
from .LightModel.Profiles.sersic import Sersic, SersicElliptic # NOTE: the Sersic class will be suppressed in the future
from .LightModel.Profiles.shapelets import Shapelets
from .LightModel.Profiles.uniform import Uniform
from .LightModel.Profiles.pixelated import Pixelated

# Set the package release version
version_info = (0, 1, 0)
__version__ = '.'.join(str(c) for c in version_info)
from .MassModel.mass_model import MassModel
from .MassModel.Profiles.sis import SIS # NOTE: this will be suppressed in the future
from .MassModel.Profiles.sie import SIE
from .MassModel.Profiles.nie import NIE
from .MassModel.Profiles.epl import EPL
from .MassModel.Profiles.shear import ShearGammaPsi
from .MassModel.Profiles.gaussian_potential import Gaussian
from .MassModel.Profiles.point_mass import PointMass
from .MassModel.Profiles.multipole import Multipole
from .MassModel.Profiles.pixelated import (
PixelatedPotential, PixelatedPotentialDirac, PixelatedFixed
)

# Set the package details
__author__ = 'Aymeric Galan, Austin Peel, Giorgos Vernardos & Herculens contributors'
__email__ = '[email protected]'
__year__ = '2021-2024'
__credits__ = 'Herculens contributors, EPFL (see AUTHORS.md)'
__url__ = 'https://github.com/Herculens/herculens'
__description__ = 'Auto-differentiable strong lens modelling'
__license__ = 'MIT'
from .PointSourceModel.point_source_model import PointSourceModel

from .LensImage.lens_image import LensImage, LensImage3D
from .Inference.loss import Loss
from .Inference.ProbModel.numpyro import NumpyroModel
from .Inference.Optimization.jaxopt import JaxoptOptimizer
from .Analysis.plot import Plotter

from .Util import param_util as prmu
from .Util import plot_util as pltu
# from .Util import jifty_util as jftu
19 changes: 19 additions & 0 deletions herculens/info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""

This file initializes the coolest module
and provides some basic information about the package.

"""

# Set the package release version
version_info = (0, 1, 0)
__version__ = '.'.join(str(c) for c in version_info)

# Set the package details
__author__ = 'Aymeric Galan, Austin Peel, Giorgos Vernardos & Herculens contributors'
__email__ = '[email protected]'
__year__ = '2021-2024'
__credits__ = 'Herculens contributors, EPFL (see AUTHORS.md)'
__url__ = 'https://github.com/Herculens/herculens'
__description__ = 'Auto-differentiable strong lens modelling'
__license__ = 'MIT'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

release_info = {}
infopath = os.path.abspath(os.path.join(os.path.dirname(__file__),
name, '__init__.py'))
name, 'info.py'))
with open(infopath) as open_file:
exec(open_file.read(), release_info)

Expand Down
Loading