Skip to content

Commit

Permalink
Remove a part of the recipe that doesn't belong here
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Dec 4, 2015
1 parent 4ff3a3e commit 706cd68
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions megaradrp/recipes/calibration/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,7 @@ def run(self, rinput):

# Basic processing
reduced = self.bias_process_common(rinput.obresult, rinput.master_bias)

_logger.info('extract fibers')
rssdata = apextract_tracemap(reduced[0].data, rinput.tracemap)
# FIXME: we are ignoring here all the possible bad pixels
# and WL distortion when doing the normalization
# rssdata /= rssdata.mean() #Originally uncomment
rsshdu = fits.PrimaryHDU(rssdata, header=reduced[0].header)
rss = fits.HDUList([rsshdu])

_logger.info('extraction completed')
_logger.info('fiber flat reduction ended')

data = rss[0].data

data = reduced[0].data
cstart = 2000
hs = 3
step1 = 2
Expand All @@ -82,13 +69,15 @@ def run(self, rinput):

_logger.info(' %i peaks found', len(central_peaks))

tracelist = []

# The byteswapping is required by the cython module
if data.dtype.byteorder != '=':
_logger.debug('byteswapping image')
image2 = data.byteswap().newbyteorder()
else:
image2 = data

tracelist = []
_logger.info('trace peaks')
for dtrace in central_peaks.values():

Expand All @@ -101,4 +90,4 @@ def run(self, rinput):
'start':0, 'stop':4095,
'fitparms': pfit.tolist()})

return self.create_result(fiberflat_frame=rss, traces=tracelist)
return self.create_result(fiberflat_frame=reduced, traces=tracelist)

0 comments on commit 706cd68

Please sign in to comment.