GithubHelp home page GithubHelp logo

bmorris3 / arcesetc Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 4.12 MB

Exposure time calculator for the ARC Echelle Spectrograph (ARCES) on the Apache Point Observatory 3.5 m Telescope

Home Page: https://arcesetc.readthedocs.io

License: MIT License

Python 8.30% Jupyter Notebook 91.70%
astronomy exposure-calculator spectroscopy

arcesetc's Introduction

Hi there, I'm Brett ๐Ÿ‘‹

Roles

Read more


Software by topic

General astronomy utilities

  • astroplan (ApJ paper): Observation planning package for astronomers
  • tynt: Light-weight astronomical color filter curves
  • expecto: Retrieve PHOENIX model stellar spectra via FTP
  • arcesetc (JOSS paper): Exposure time calculator for the ARC Echelle Spectrograph (ARCES) on the Apache Point Observatory 3.5 m Telescope
  • aesop (JOSS paper): Echelle Spectroscopic Observation Pipeline for the ARC 3.5 m Telescope at APO

Exoplanet photometry

Stellar oscillations, granulation, and magnetic activity packages

STScI projects w/ significant contributions

  • jdaviz (presentation): JWST astronomical data analysis tools in the Jupyter platform
  • romancal: Python library to process science observations from the Nancy Grace Roman Space Telescope
  • lcviz: Light curve visualization and analysis tool

Other

Stats tutorials

Jupyter notebook tutorials

Pedagogical Jupyter notebook tutorials with interactive features

In-person workshops

arcesetc's People

Contributors

bmorris3 avatar tzdwi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tzdwi

arcesetc's Issues

MNT: Stop using ci-helpers in appveyor.yml

To whom it may concern,

If you are using https://github.com/astropy/ci-helpers in your appveyor.yml , please know that the Astropy project has dropped active development/support for Appveyor CI. If it still works, good for you, because we did not remove the relevant files (yet). But if it ever stops working, we have no plans to fix anything for Appveyor CI. Please consider using native Windows support other CI, e.g., Travis CI (see https://docs.travis-ci.com/user/reference/windows/). We apologize for any inconvenience caused.

If this issue is opened in error or irrelevant to you, feel free to close. Thank you.

xref astropy/ci-helpers#464

JOSS - Confusion about closest sptype

In the Getting Started guide there is a note on the first example that G4V -> G5V because there is no exact match but in the example notebook it points out that it will try to guess the type if something is close and give a ValueError warning.

I can see in closest_sptype that there is some special handling of xxV types. Some clarification of when it is corrected would be helpful.

Units issue with np.polyval in utils.py

I get the below error message when trying out the example code. I'm working on a fix and will submit a pull request if I find one.

In [18]: sptype = 'B3V' 
    ...: wavelength = 3990 * u.Angstrom 
    ...: signal_to_noise = 100 
    ...: V = 5 
    ...:  
    ...: fig, ax, exp_time = plot_order_sn(sptype, wavelength, V, signal_to_noise=signal_to_noise)                                        
---------------------------------------------------------------------------
UnitConversionError                       Traceback (most recent call last)
<ipython-input-18-6ef2779d36e5> in <module>
      4 V = 5
      5 
----> 6 fig, ax, exp_time = plot_order_sn(sptype, wavelength, V, signal_to_noise=signal_to_noise)

~/anaconda3/lib/python3.7/site-packages/astropy/units/decorators.py in wrapper(*func_args, **func_kwargs)
    232             # Call the original function with any equivalencies in force.
    233             with add_enabled_equivalencies(self.equivalencies):
--> 234                 return_ = wrapped_function(*func_args, **func_kwargs)
    235             if wrapped_signature.return_annotation not in (inspect.Signature.empty, None):
    236                 return return_.to(wrapped_signature.return_annotation)

~/anaconda3/lib/python3.7/site-packages/arcesetc/plots.py in plot_order_sn(sptype, wavelength, V, exp_time, signal_to_noise, **kwargs)
    175                                                              V,
    176                                                              exp_time=exp_time,
--> 177                                                              signal_to_noise=signal_to_noise)
    178     sn = flux / np.sqrt(flux)
    179     ax.set_title('Sp. Type: {0}, Exposure time: {1:.1f}'

~/anaconda3/lib/python3.7/site-packages/astropy/units/decorators.py in wrapper(*func_args, **func_kwargs)
    232             # Call the original function with any equivalencies in force.
    233             with add_enabled_equivalencies(self.equivalencies):
--> 234                 return_ = wrapped_function(*func_args, **func_kwargs)
    235             if wrapped_signature.return_annotation not in (inspect.Signature.empty, None):
    236                 return return_.to(wrapped_signature.return_annotation)

~/anaconda3/lib/python3.7/site-packages/arcesetc/util.py in reconstruct_order(sptype, wavelength, V, exp_time, signal_to_noise)
    213 
    214     closest_order = get_closest_order(matrix, wavelength)
--> 215     wave, flux = matrix_row_to_spectrum(matrix, closest_order)
    216     flux *= scale_flux(archive[target], V)
    217 

~/anaconda3/lib/python3.7/site-packages/arcesetc/util.py in matrix_row_to_spectrum(matrix, closest_order)
    119     wave = np.arange(lam_0 - n_lam*delta_lam/2, lam_0 + n_lam*delta_lam/2,
    120                      delta_lam) * u.Angstrom
--> 121     flux = np.polyval(polynomial_coeffs, wave-lam_0 * u.Angstrom)
    122     return wave, flux
    123 

<__array_function__ internals> in polyval(*args, **kwargs)

~/anaconda3/lib/python3.7/site-packages/numpy/lib/polynomial.py in polyval(p, x)
    734         y = NX.zeros_like(x)
    735     for i in range(len(p)):
--> 736         y = y * x + p[i]
    737     return y
    738 

~/anaconda3/lib/python3.7/site-packages/astropy/units/quantity.py in __array_ufunc__(self, function, method, *inputs, **kwargs)
    455         # consistent units between two inputs (e.g., in np.add) --
    456         # and the unit of the result (or tuple of units for nout > 1).
--> 457         converters, unit = converters_and_unit(function, method, *inputs)
    458 
    459         out = kwargs.get('out', None)

~/anaconda3/lib/python3.7/site-packages/astropy/units/quantity_helper/converters.py in converters_and_unit(function, method, *args)
    187                             "argument is not a quantity (unless the "
    188                             "latter is all zero/infinity/nan)"
--> 189                             .format(function.__name__))
    190             except TypeError:
    191                 # _can_have_arbitrary_unit failed: arg could not be compared

UnitConversionError: Can only apply 'add' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

JOSS - Contributing

The contributing pages is currently RST and should probably be renamed to CONTRIBUTING.

It could also use a statement about how one could possible contribute to the adding of new spectra as it's not obvious.

Cleanup notebooks folder

Hey @bmorris3, just starting to look things over. The notebooks folder could probably use a little clean up in order to clarify things. Some of them either look like actual notebooks (:smile:) or things that maybe shouldn't have been committed (e.g. the targets_path.txt file.)

A statement in the README pointing to any appropriate notebooks would also be nice although that could just be left for the docs.

JOSS - Documentation changes - sptype

Trailing documentation for the sptype param in all functions:

https://github.com/bmorris3/arcesetc/blob/master/arcesetc/plots.py#L117
https://github.com/bmorris3/arcesetc/blob/master/arcesetc/plots.py#L26
https://github.com/bmorris3/arcesetc/blob/master/arcesetc/util.py#L243
https://github.com/bmorris3/arcesetc/blob/master/arcesetc/util.py#L186

There's an "If" that either shouldn't be there or a missing sentence.

FWIW, one of our volunteers has been very adamant about us clearly having periods to end all sentences. Many of the params are missing these (e.g. for V in the functions) while many of them have it (e.g. for wavelength). For missing periods one could make an argument that it could look like a trailing sentence and that's sort of apparent with this trailing sentence.

Anyway, for consistency it would be nice if all param doc sentences had periods.

JOSS - Missing pytest-astropy

pytest-astropy isn't pulled in as a dependency and therefore python setup.py test doesn't work out of the box in a clean environment.

JOSS - Statement of Need

The JOSS paper and the main README could benefit from a simple 1-2 sentence statement about who you are expecting to use this and what for (even though it's sort of obvious it's not stated).

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.