Giter VIP home page Giter VIP logo

sunkit-magex's Introduction

sunkit-magex

sunkit-magex is a Python software package that provides a set of tools for the modelling of magnetic field data. It is a SunPy affiliated package and is built on top of sunpy and astropy.

Currently it only supports the potential field source surface (PFSS) model, but we hope to expand it to include other models in the future.

Installation

We recommended following the installation guide in the documentation.

Usage

If you are new to sunkit-magex, the best place to start is the example gallery.

Changes

See our changelog.

Getting Help

For more information or to ask questions about sunkit-magex or any other SunPy Project package, please check out:

Contributing

The SunPy Project is a community-driven open-source project that welcomes any and all contributions. Whether you are a developer, student, or user, you can help by contributing code, documentation, or community support.

If you would like to get involved, the Newcomers Guide guide explains the many different ways to contribute to the SunPy Project and also shows how to get set up with a development workflow.

Help is always welcome, so come and say hello by joining the SunPy Chat and look over the Good First Issues list for the ideal places to start.

Code of Conduct

When you are interacting with the SunPy Community you are asked to follow our Code of Conduct.

License

This project is Copyright (c) The SunPy Community and licensed under the terms of the GNU GPL v3+ license. This package is based upon the Openastronomy packaging guide which is licensed under the BSD 3-clause license. See the licenses folder for more information.

Contributing

We love contributions! sunkit-magex is open source, built on open source, and we'd love to have you hang out in our community.

Imposter syndrome disclaimer: We want your help. No, really.

There may be a little voice inside your head that is telling you that you're not ready to be an open source contributor; that your skills aren't nearly good enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one's coding skills. Writing perfect code isn't the measure of a good developer (that would disqualify all of us!); it's trying to create something, making mistakes, and learning from those mistakes. That's how we all improve, and we are happy to help others learn.

Being an open source contributor doesn't just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you're coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.

Note: This disclaimer was originally written by Adrienne Lowe for a PyCon talk, and was adapted for sunkit-magex based on its use in the README file for the MetPy project.

sunkit-magex's People

Contributors

cadair avatar cyclingninja avatar dstansby avatar mancellin avatar nabobalis avatar pre-commit-ci[bot] avatar stbadman avatar trestansimon avatar wtbarnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cadair stbadman

sunkit-magex's Issues

Release Initial Version

Initial Release Todo

  1. 7 of 7
  2. python review-requested

Automatically pick working/best Tracer

Describe the feature

Currently, the user has to manually define the tracer to use with, e.g., tracer = pfss.tracing.FortranTracer(), where FortranTracer requires the (optional) streamtracer package; the built-in alternative is PythonTracer. I'd suggest to add a general function pfss.tracing.Tracer() that tries to load the more performant tracer (Fortran/rust), and if it fails, falls back to the Python one (maybe giving a warning/info).

This would be obsolete if streamtracer were a non-optional a dependency.

Proposed solution

No response

Fix documentation build

Describe the bug

There are various things wrong in the docs build, the whole thing needs a look over and a cleanup.

To Reproduce

No response

Screenshots

No response

System Details

No response

Installation method

No response

Post-release Tasks

Provide a general description of the issue or problem.

Now that 1.0.0 is out there are things we should probably do

  • Blog post
  • solarnews / uksp
  • socials
  • pyvista

Any other suggestions?

Add support for sunpy 5.1+

Describe the bug

Because of the GONG map situation.

To Reproduce

import sunpy

sunpy.map.Map(...)
etc

Screenshots

No response

System Details

No response

Installation method

No response

Maximum number of radial grid points produces all Nan solution

Describe the bug

Consistently finding that increasing number of grid points in the radial direction (nrho) above 192 causes all nan outputs to the solution.

To Reproduce

import astropy.constants as const
import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
import sunpy.map
from astropy.coordinates import SkyCoord

from sunkit_magex import pfss

###############################################################################
# Load a GONG magnetic field map.

gong_fname = pfss.sample_data.get_gong_map()
gong_map = sunpy.map.Map(gong_fname)

###############################################################################
# The PFSS solution is calculated on a regular 3D grid in (phi, s, rho), where
# rho = ln(r), and r is the standard spherical radial coordinate. We need to
# define the number of rho grid points, and the source surface radius.

nrho = 35
rss = 2.5

###############################################################################
# From the boundary condition, number of radial grid points, and source
# surface, we now construct an Input object that stores this information.

pfss_in = pfss.Input(gong_map, 193, rss)
pfss_out = pfss.pfss(pfss_in)
pfss_out.source_surface_br.plot()

Screenshots

pfss-max-gridpoints-allNan

Output of plotting source surface br with 193 radial grid points. All values are Nan (also can be verified that the output.bcgrid of field vector values is Nan everywhere

System Details

General
#######
OS: Ubuntu (22.04, Linux 6.5.0-25-generic)
Arch: 64bit, (x86_64)
sunpy: 5.1.0
Installation path: /home/sbadman/anaconda3/lib/python3.9/site-packages/sunpy-5.1.0.dist-info

Required Dependencies
#####################
astropy: 5.3.4
numpy: 1.24.3
packaging: 23.1
parfive: 2.0.1

sunkit-magex current github main branch (also most recent version of pfsspy)

Installation method

git checkout

Change of Tracer changes the results

Describe the bug

For tests:

  • test_field_line_polarity
  • test_footpoints

If you replace the Python Tracer with the one from StreamTracer, the polarity and the number of solar_footpoint change breaking both tests.

On the surface I would expect both traces to give the same output.

Question is, do older version of streamtracer agree or not
Also is this a problem? Should they give the same output?

numpy 2.0 causes deprecation warnings

Describe the bug

๐Ÿ’ฉ ๐Ÿ”ฅ ๐Ÿ˜ข

To Reproduce

No response

Screenshots

No response

System Details

No response

Installation method

No response

Drop support for python 3.9

Describe the bug

SPEC-1 says so

To Reproduce

import sunpy

sunpy.map.Map(...)
etc

Screenshots

No response

System Details

No response

Installation method

No response

nondeterministic test faliure

Describe the bug

There seems to be a hash download problem with the gong data: https://github.com/sunpy/sunkit-magex/actions/runs/8112486469/job/22173846679#step:10:171

I am not sure we should be downloading anything in the regular test builds, perhaps we should move whatever needs that data to an online build? We should also look to see if we can make the download more reliable.

To Reproduce

run the tests a bunch of times and wait.

Screenshots

No response

System Details

No response

Installation method

No response

Add towncrier

Provide a general description of the issue or problem.

We should have a proper changelog.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.