Skip to content

Commit

Permalink
Merge pull request #310 from simontorres/improve_wavelength_calibrati…
Browse files Browse the repository at this point in the history
…on_class

Improve wavelength calibration class
  • Loading branch information
Simon Torres authored Jan 8, 2020
2 parents e3d1d91 + 9e1ed05 commit da6c38b
Show file tree
Hide file tree
Showing 18 changed files with 293 additions and 258 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
python:
- '3.5'
- '3.6'
- '3.8'

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/scratch1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import textwrap
import json

parameters_file = "/user/simon/development/soar/goodman/dev/param.json"
parameters_file = "/user/simon/development/soar/goodman/dev/param.json_output"


def load_json_params(json_file, param_group):
Expand Down
12 changes: 6 additions & 6 deletions dev-tools/telemetry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@


def load_config(name, config_path=None):
"""Load configuration dictionary from json file
"""Load configuration dictionary from json_output file
Args:
name (str): name of configuration stored in the json file
config_file (str): json configuration file name
name (str): name of configuration stored in the json_output file
config_file (str): json_output configuration file name
Returns:
A dictionary of the configuration defined by **name**. If it doesn't
Expand All @@ -25,7 +25,7 @@ def load_config(name, config_path=None):
"""
if config_path is None:
config_path = pkg_resources.resource_filename('pipeline',
'data/params/config.json')
'data/params/config.json_output')

if os.path.isfile(config_path):
with open(config_path) as json_config:
Expand Down Expand Up @@ -185,8 +185,8 @@ def execute(self, sql_query):


if __name__ == '__main__':
json_config = 'config.json'
with open('config.json') as json_config:
json_config = 'config.json_output'
with open('config.json_output') as json_config:
config = json.load(json_config)

database = DatabaseHandler(host=config['mysql']['host'],
Expand Down
7 changes: 7 additions & 0 deletions docs/change_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ V1.3.0 Unreleased
- Updated keyword values of all reference lamps in the library according to [#292]
- Refactored `wavelength.WavelengthCalibration` class moving several methods to
`core` [#300, #303]
- Refactored `wavelength.WavelengthCalibration` to be instantiated without
arguments.
- Improved messages at critical stages of wavelength calibration.
- Moved `setup_logging` call from main package `__init__` to scripts or entry
points, this allows to re use other master loggers.
- Changed `--background-threshold` to multiply by detection limit instead of
background level


.. _v1.2.1:
Expand Down
12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: goodman_pipeline
channels:
- astroconda
dependencies:
- numpy>=1.15.2
- numpy
- pandas==0.23.0
- matplotlib>=3.0.1
- scipy>=1.3.0
- cython>=0.26.1
- astropy>=3
- matplotlib
- scipy
- cython
- astropy
- pip
- pip:
- ccdproc>=1.3.0.post1
- ccdproc
- coveralls
- astroplan
- mock
Expand Down
9 changes: 1 addition & 8 deletions goodman_pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,4 @@
from . import images
from . import core

from .core import setup_logging

import sys

if '-h' not in sys.argv and \
'--help' not in sys.argv and \
'--version' not in sys.argv:
setup_logging()
from .core import setup_logging
Loading

0 comments on commit da6c38b

Please sign in to comment.