will-henney / proplyd-cloudy

Ionization/dynamic models of proplyds
http://deprecated.github.com/proplyd-cloudy/
2 stars 0 forks source link

double lambda in save.py #28

Closed nahieflores closed 12 years ago

nahieflores commented 12 years ago

In save.py we had two times the line 4740A. Then when we try to sort the lines in model_profile.py we have a mistake:

Line fluxes relative to H beta = 100: Traceback (most recent call last): File "../../../emission/model_profile.py", line 195, in for emline in sorted(emlines, key=sortkey): File "../../../emission/model_profile.py", line 186, in sortkey wav = float(wav_s[:-1]) ValueError: invalid literal for float(): 4740A

I can understand the problem and is easy to put a line in model_profile.py, that if the line exist, delete the raw or skip it but I couldn't find the way. I will try this night but is very easy and it have been taking me a lot of time!

will-henney commented 12 years ago

It looks to me like the problem is with the line label, not that the line is repeated. The slice wav_s[:-1] should just be the 4-digit wavelength, without the "A". Is there another character after "4740A" in the file?

Sent from a leading brand of mobile device

On 20/02/2012, at 20:00, nahiefloresreply@reply.github.com wrote:

In save.py we had two times the line 4740A. Then when we try to sort the lines in model_profile.py we have a mistake:

Line fluxes relative to H beta = 100: Traceback (most recent call last): File "../../../emission/model_profile.py", line 195, in for emline in sorted(emlines, key=sortkey): File "../../../emission/model_profile.py", line 186, in sortkey wav = float(wav_s[:-1]) ValueError: invalid literal for float(): 4740A

I can understand the problem and is easy to put a line in model_profile.py, that if the line exist, delete the raw or skip it but I couldn't find the way. I will try this night but is very easy and it have been taking me a lot of time!


Reply to this email directly or view it on GitHub: https://github.com/deprecated/proplyd-cloudy/issues/28

will-henney commented 12 years ago

Well the line was certainly repeated so I have pushed a fix for that to master. Does it work now? I still don't understand the error message.

This is the first time I have edited a file through the website – and on my iPod too!

nahieflores commented 12 years ago

Wow! I can't believe you do it with an iPod!

The problem persist. The file that we need to modify is the "model_profile.py" I think, because we have the models now and we only need the profiles...