Skip to content

Commit

Permalink
Playing with JSON instead of YAML.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicocardiel committed Sep 28, 2016
1 parent 62f891f commit 75134b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion megaradrp/products/wavecalibration.py
Expand Up @@ -23,6 +23,7 @@
import uuid

import yaml
import json

import numina.core.types
import numina.core.products
Expand Down Expand Up @@ -59,8 +60,10 @@ def __setstate__(self, state):
def _datatype_dump(cls, obj, where):
filename = where.destination + '.yaml'

with open('xxx.txt', 'w') as fd:
fd.write(str(obj.__getstate__()))
with open(filename, 'w') as fd:
yaml.dump(obj.__getstate__(), fd)
json.dump(obj.__getstate__(), fd, indent=4, sort_keys=True)

return filename

Expand Down
4 changes: 2 additions & 2 deletions megaradrp/recipes/calibration/arc.py
Expand Up @@ -335,8 +335,8 @@ def calibrate_wl(self, rss, lines_catalog, poldeg, tracemap,
# coeff_table[idx] = numpy_array_with_coeff
self.logger.info('Errors in fitting: %s', error_contador)
self.logger.info('Missing fibers: %s', missing_fib)
lines_rss_fwhm = self.run_on_image(rss, tracemap, threshold,
min_distance, limit)
# lines_rss_fwhm = self.run_on_image(rss, tracemap, threshold,
# min_distance, limit)

data_wlcalib = WavelengthCalibration(instrument='MEGARA')
data_wlcalib.wvlist = dict_of_solution_wv
Expand Down

0 comments on commit 75134b9

Please sign in to comment.