Skip to content

Commit

Permalink
try to make codacy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
julienguy committed May 13, 2020
1 parent ba0f82f commit 7feec9b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions py/desimeter/transform/fvc2fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
Utility functions to fit and apply coordinates transformation from FVC to FP
"""

import os
import json
import numpy as np
from astropy.table import Table,Column

from desimeter.io import load_metrology
from desimeter.log import get_logger
from desimeter.transform.zhaoburge import getZhaoBurgeXY, getZhaoBurgeTerm, transform, fit_scale_rotation_offset, fitZhaoBurge
from desimeter.transform.zhaoburge import getZhaoBurgeXY, transform, fit_scale_rotation_offset

#-------------------------------------------------------------------------

class FVC2FP(object):

def __init__(self):
"""
init
"""
self.xfvc_scale = -3000.
self.yfvc_scale = 3000.
self.xfvc_offset = 3000.
Expand Down Expand Up @@ -96,7 +97,7 @@ def fromjson(cls, jsonstring):
tx.zbpolids = np.asarray(params['zbpolids'])
tx.zbcoeffs = np.asarray(params['zbcoeffs']).astype(float)
else :
raise RuntimeError("don't know version {}".format(version))
raise RuntimeError("don't know version {}".format(params['version']))

if 'xfvc_scale' in params : tx.xfvc_scale = params['xfvc_scale']
if 'yfvc_scale' in params : tx.yfvc_scale = params['yfvc_scale']
Expand All @@ -106,7 +107,10 @@ def fromjson(cls, jsonstring):
return tx

def fit(self, spots, metrology=None, update_spots=False, zbfit=True):
"""TODO: document"""
"""
TODO: document
"""

log = get_logger()
if metrology is not None:
self.metrology = metrology
Expand Down

0 comments on commit 7feec9b

Please sign in to comment.