Cosmoglobe/c3pp

"plot" not working properly

Closed this issue · 1 comments

Running c3pp plot while specifying -min and/or -max gives an error message:

File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/c3postproc/commands.py", line 214, in plot
Plotter(input, dataset, nside, auto, min, max, minmax, range, colorbar, lmax, fwhm, mask, mfill, sig, remove_dipole, logscale, size, white_background, darkmode, pdf, cmap, title, ltitle, unit, scale, verbose,)
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/c3postproc/plotter.py", line 371, in Plotter
ticklabels = [fmt(i, 1) for i in ticklabels]
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/c3postproc/plotter.py", line 371, in
ticklabels = [fmt(i, 1) for i in ticklabels]
File "/mn/stornext/u3/krisjand/.local/lib/python3.6/site-packages/c3postproc/plotter.py", line 786, in fmt
TypeError: bad operand type for abs(): 'str'

Apparently, the min/max values are stored as string (or something).

Furthermore, running "plot" with the -range option does nothing (the range is not applied).

Fixed