jkrogager / VoigtFit

Python code to fit absorption lines semi-interactively
http://voigtfit.readthedocs.io/
MIT License
28 stars 12 forks source link

Problem plotting after removing a line. #13

Closed jkrogager closed 6 years ago

jkrogager commented 6 years ago

After removing a line from the dataset ( dataset.remove_line(tag) ), the plot_fit() method stopped working. It returns the following error message in iPython:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/krogager/Data/UVES/Q0420-388/fit_lowion.py in <module>()
     63 cols = ['RoyalBlue']
     64 ds.plot_fit(rebin=1, xmin=-250, xmax=300, linestyles=ls, colors=cols,
---> 65             subsample_profile=2)
     66 

/Users/krogager/Projects/VoigtFit/VoigtFit/dataset.pyc in plot_fit(self, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals)
   1350                               filename=filename, show=show,
   1351                               subsample_profile=subsample_profile, npad=npad,
-> 1352                               highlight=highlight, residuals=residuals)
   1353         plt.show()
   1354 

/Users/krogager/Projects/VoigtFit/VoigtFit/output.pyc in plot_all_lines(dataset, plot_fit, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals)
    237             region = dataset.find_line(ref_line.tag)
    238             lines_to_plot.append(ref_line.tag)
--> 239             if len(region.lines) == 1:
    240                 included_lines.append(ref_line.tag)
    241             else:

AttributeError: 'NoneType' object has no attribute 'lines'
psykoman commented 6 years ago

Hi Jens,

I am not able to sync the Github folder. I receive a strange error message:

"You may not have permission to access the repository or the repository may have been archived”

Have you archived or modified the GitHub repository?

Thanks a lot Cheers, Luca

On 17 Nov 2017, at 13:31, Jens-Kristian Krogager notifications@github.com wrote:

After removing a line from the dataset ( dataset.remove_line(tag) ), the plot_fit() method stopped working. It returns the following error message in iPython:


AttributeError Traceback (most recent call last) /Users/krogager/Data/UVES/Q0420-388/fit_lowion.py in () 63 cols = ['RoyalBlue'] 64 ds.plot_fit(rebin=1, xmin=-250, xmax=300, linestyles=ls, colors=cols, ---> 65 subsample_profile=2) 66

/Users/krogager/Projects/VoigtFit/VoigtFit/dataset.pyc in plot_fit(self, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals) 1350 filename=filename, show=show, 1351 subsample_profile=subsample_profile, npad=npad, -> 1352 highlight=highlight, residuals=residuals) 1353 plt.show() 1354

/Users/krogager/Projects/VoigtFit/VoigtFit/output.pyc in plot_all_lines(dataset, plot_fit, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals) 237 region = dataset.find_line(ref_line.tag) 238 lines_to_plot.append(ref_line.tag) --> 239 if len(region.lines) == 1: 240 included_lines.append(ref_line.tag) 241 else:

AttributeError: 'NoneType' object has no attribute 'lines' — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jkrogager/VoigtFit/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/ANmo6zbh-O-2jyfIy-zaLooXlLwyvHSeks5s3VJggaJpZM4Qhw6l.

jkrogager commented 6 years ago

Hmmm... not that I know... I can't see anything wrong with the repo or with permissions.

Could you try again?

JK

psykoman mailto:notifications@github.com 21 November 2017 at 18:14 Hi Jens,

I am not able to sync the Github folder. I receive a strange error message:

"You may not have permission to access the repository or the repository may have been archived”

Have you archived or modified the GitHub repository?

Thanks a lot Cheers, Luca

On 17 Nov 2017, at 13:31, Jens-Kristian Krogager notifications@github.com wrote:

After removing a line from the dataset ( dataset.remove_line(tag) ), the plot_fit() method stopped working. It returns the following error message in iPython:


AttributeError Traceback (most recent call last) /Users/krogager/Data/UVES/Q0420-388/fit_lowion.py in () 63 cols = ['RoyalBlue'] 64 ds.plot_fit(rebin=1, xmin=-250, xmax=300, linestyles=ls, colors=cols, ---> 65 subsample_profile=2) 66

/Users/krogager/Projects/VoigtFit/VoigtFit/dataset.pyc in plot_fit(self, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals) 1350 filename=filename, show=show, 1351 subsample_profile=subsample_profile, npad=npad, -> 1352 highlight=highlight, residuals=residuals) 1353 plt.show() 1354

/Users/krogager/Projects/VoigtFit/VoigtFit/output.pyc in plot_all_lines(dataset, plot_fit, linestyles, colors, rebin, fontsize, xmin, xmax, max_rows, filename, show, subsample_profile, npad, highlight, residuals) 237 region = dataset.find_line(ref_line.tag) 238 lines_to_plot.append(ref_line.tag) --> 239 if len(region.lines) == 1: 240 included_lines.append(ref_line.tag) 241 else:

AttributeError: 'NoneType' object has no attribute 'lines' — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jkrogager/VoigtFit/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/ANmo6zbh-O-2jyfIy-zaLooXlLwyvHSeks5s3VJggaJpZM4Qhw6l.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkrogager/VoigtFit/issues/13#issuecomment-346096353, or mute the thread https://github.com/notifications/unsubscribe-auth/AWJ_CSIe6ukmuWN0HuHtTDHYYzchb3ASks5s4wTYgaJpZM4Qhw6l.