Giter VIP home page Giter VIP logo

msg's Introduction

The MSG Library

GitHub GitHub release (latest by date) GitHub issues Read the Docs

Overview

MSG (Multidimensional Stellar Grids) is a library that synthesizes astrophysical spectra and photometric colors via interpolation in pre-calculated grids. Given a set of stellar atmospheric parameters (e.g., effective temperature, gravity and metallicity), MSG can calculate the specific intensity of the emergent radiation field as a function of wavelength and angle. It can also convolve these data with appropriate filters and response functions, to evaluate colors in a wide variety of photometric systems.

Documentation

Full documentation for MSG can be found at https://msg.readthedocs.io/en/stable.

msg's People

Contributors

rhdtownsend avatar aaronesque avatar

Stargazers

 avatar Daniel Thaagaard Andreasen avatar Keaton Bell avatar Jennifer Sobeck avatar Jared Bryan avatar Luke Bouma avatar vlslv avatar Ivan Pribec avatar Thierry  avatar  avatar Robert Farmer avatar

Watchers

 avatar  avatar CJH avatar

msg's Issues

importing an existing grid with ascii_to_specint?

Hi Rich and Aaron,

Yesterday, I found MSG, which is precisely what I was looking for! I want to test a few grids of synthetic spectra, and I need to interpolate them without losing the flux information (something that I still need to figure out with Starfish, for example, but I think it is impossible).

I just did the Python Walkthrough, and everything worked out fine. I'm downloading the Solar-alpha Göttingen Grids from the website to test them.

I want to import the BTSettl models with their different 'flavors.' I read the documentation and saw the tools to do it. However, I'm new to Python (used to do all in IDL), and I'm trying to figure out how to call the ascii_to_specint function to include the labels, etc, to follow the Importing Data instructions. Could you please help me with that?

The original site of the BTSettl models is not working anymore (I guess after the passing of France Allard the website got removed) but VOSA/VO has them in ascii and VOTable formats, so I plan to use those.

Thanks!
Babs

Allow partial reads of individual specint_t's

Currently, when loading a specint_t from file, the whole spectrum is read. This is wasteful if the user only wants a subset of the spectrum, and/or is using passbands that cover only part of the spectrum. Allowing for partial reads would alleviate this inefficiency.

Possible unit error in PyMSG

First, thank you for creating MSG! I'm excited to explore applications of your package.

When comparing the output of PyMSG (following the tutorial in your documentation) with Pysynphot I've noticed what could be a unit misspecification in the PyMSG output. Below is a comparison for a star with Teff = 4803, [Fe/H] = 0.0, and log_g = 4.57 (both spectra are surface flux, not the observed flux at Earth).

Converting the PyMSG output on the right (erg / cm^2 / s / A) to W / m^2 / m requires multiplying by 1e-7 * 1e4 * 1e10 = 1e7, which produces a spectrum 8 orders of magnitude greater than the Pysynphot output on the left. The peak flux on the left matches a black body with the same Teff, so the Pysynphot output looks correct.

I'm wondering if the output units for PyMSG are actually erg / cm^2 / s / cm ? Then the conversion factor would be 1e-7 * 1e4 * 1e2 = 1e-1 and PyMSG would agree with Pysynphot after converting to W / m^2 / m.

Thanks in advance!

Pysynphot_PyMSG_comparison

Failure to build 1.0-rc1 release tarball with MESA SDK 21.4.1 on Fedora 36

I just tried to build 1.0-rc1 by following the instructions in the Quick Start, specifically:

$ export MESASDK_ROOT=$HOME/mesa/sdk/21.4.1
$ source $MESASDK_ROOT/bin/mesasdk_init.sh
$ tar -xf ~/Downloads/msg-1.0-rc1.tar.gz # after clicking the release link
$ cd msg-1.0-rc1
$ export MSG_DIR=$(pwd)
$ make -C $MSG_DIR

and ran into the error

$ make -C $MSG_DIR
make: Entering directory '/home/wball/code/msg/1.0-rc1'
../src/lib/cmsg_m.fypp:18: error: include file 'forum.inc' not found [FyppFatalError]
../src/lib/fmsg_m.fypp:18: error: include file 'forum.inc' not found [FyppFatalError]
../src/lib/msg_m.fypp:18: error: include file 'forum.inc' not found [FyppFatalError]
../src/lib/forum_m.fypp:18: error: include file 'forum.inc' not found [FyppFatalError]
make[1]: *** No rule to make target 'forum_m.f90', needed by 'forum_m.o'.  Stop.
make: *** [Makefile:15: all] Error 2
make: Leaving directory '/home/wball/code/msg/1.0-rc1'

I noticed that forum is a git submodule in a separate repo. There's an empty folder under $MSG_DIR/src/forum, too.

$ find . -iname *forum*
./src/forum
./src/lib/forum_m.fypp
./build/.forum_m.dpp

The instructions for cloning the git repo and installing the development version do end with a successful build, so I suspect the relevant files from forum aren't being correctly included in the GitHub release archive.

Community Guidelines

Please give instructions on how to

  1. Contribute to the software
  2. Report issues or problems with the software
  3. Seek support

These can also just be the github features (e.g. github issues)

Review thread: openjournals/joss-reviews#4602

cfitsio install library looking in the wrong spot

When installing msg, I bug out with the error:

ld: warning: directory not found for option '-L/opt/local/lib'
ld: library not found for -lcfitsio

I have the cfitsio library installed, but I cannot find where to tell the make file to look in the correct directory location. Any ideas?

Kernel dies running PhotGrid

Running

sg = pymsg.SpecGrid('sg-demo.h5')

does work, but running

pg = pymsg.PhotGrid(‘sg-demo.h5’, ‘pb-Kepler-Kepler.K-AB.h5’)

kills the kernel.

Kernel dies on pymsg tutorial

I'm running into another bug here. When going through the Python walkthrough, my kernel dies when running:

# Load the SpecGrid
GRID_DIR = os.path.join(MSG_DIR, 'data', 'grids')
specgrid_file_name = os.path.join(GRID_DIR, 'sg-demo.h5')
specgrid = pymsg.SpecGrid(specgrid_file_name)

Specifically, the last line is the culprit. Before I start diving into this, do you have any ideas? Because it's cython, such bugs are quite difficult to find.

add topic

I suggest adding the topic astrophysics in the About section.

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.