Skip to content

Commit

Permalink
Filenames with fibers have format 03d (fixes #233)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Feb 21, 2019
1 parent ab4b148 commit 0400606
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions megaradrp/recipes/calibration/modelmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ def run(self, rinput):
if self.intermediate_results:
if dolog:
self.logger.debug('saving plots')
plt.title('std %s' % fibid)
plt.title('std fib{:03d}'.format(fibid))
plt.plot(g_col, g_std, 'b*')
plt.plot(g_col, interpol_std(g_col), 'r')
plt.savefig('fib_{}_std.png'.format(fibid))
plt.savefig('fib_{:03d}_std.png'.format(fibid))
plt.close()
plt.title('mean %s' % fibid)
plt.title('mean fin{:03d}'.format(fibid))
plt.plot(g_col, g_mean, 'b*')
plt.plot(g_col, interpol_mean(g_col), 'r')
plt.savefig('fib_{}_mean.png'.format(fibid))
plt.savefig('fib_{:03d}_mean.png'.format(fibid))
plt.close()
if dolog:
self.logger.debug('saving plots end')
Expand Down
6 changes: 3 additions & 3 deletions megaradrp/recipes/calibration/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ def search_traces(self, reduced, boxes, box_borders, cstart=2000,

if debug_plot:
plt.plot(mm[:, 0], mm[:, 1], '.')
plt.savefig('trace-xy-%d.png' % dtrace.fibid)
plt.savefig('trace-xy-{:03d}.png'.format(dtrace.fibid))
plt.close()
plt.plot(mm[:, 0], mm[:, 2], '.')
plt.savefig('trace-xz-%d.png' % dtrace.fibid)
plt.savefig('trace-xz-{:03d}.png'.format(dtrace.fibid))
plt.close()
if len(mm) < poldeg + 1:
self.logger.warning('in fibid %d, only %d points to fit pol of degree %d',
Expand Down Expand Up @@ -483,7 +483,7 @@ def init_traces(image, center, hs, boxes, box_borders, tol=1.5, threshold=0.37,
if debug_plot:
plt.plot(region)
plt.plot(ipeaks_int, region[ipeaks_int], 'r*')
plt.savefig('central_cut_%d.png' % boxid)
plt.savefig('central_cut_{:02d}.png'.format(boxid))
plt.close()

startid = lastid + 1
Expand Down

0 comments on commit 0400606

Please sign in to comment.