Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add widget to lt_xspec for selecting between multiple input spectra #403

Merged
merged 11 commits into from
Aug 24, 2017

Conversation

profxj
Copy link
Contributor

@profxj profxj commented Jul 17, 2017

As titled.

Also adds functionality to dynaimcally set gui size
based on number of pixels in the monitor.

No new docs or tests.

@profxj profxj assigned profxj and ntejos and unassigned profxj Jul 17, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 73.137% when pulling aaea6f2 on multi_spec_in_xspec into 1d06d2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 73.137% when pulling 9848117 on multi_spec_in_xspec into 1d06d2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 73.137% when pulling 3230941 on multi_spec_in_xspec into 1d06d2d on master.

@ntejos
Copy link
Contributor

ntejos commented Jul 25, 2017

May I review this?

@profxj
Copy link
Contributor Author

profxj commented Jul 26, 2017

Please do!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 73.14% when pulling f6a89ce on multi_spec_in_xspec into 1d06d2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 73.121% when pulling 6b10036 on multi_spec_in_xspec into 1d06d2d on master.

Copy link
Contributor

@ntejos ntejos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some initial coments. I haven't testet the GUI yet... do you have a file with multiple spectra on it for testing?

dline.analy['spec'] = tspec
dline.limits.set(iwv)
dline.measure_ew()
mssg = 'Using dummy '+ dline.__repr__()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change message to "Assuming line is " (?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines seem duplicates from 471 and 472. May be best to take them out of the if and else statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so a user can measure the EW without setting a line.
Have made a small edit.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 73.111% when pulling 0e6991c on multi_spec_in_xspec into 1d06d2d on master.

@ntejos
Copy link
Contributor

ntejos commented Aug 19, 2017

I tested the GUI and everything seems good. I'm not so convinced whether we want to start labeling the spectra from 0 to n-1, wouldn't make more sense to start from 1 to n instead?

I also left comments on the code while ago (see above)... not sure if you considered them.

if hasattr(spec, 'labels'):
spec_labels = spec.labels
else:
spec_labels = ['{:d}'.format(ii) for ii in range(spec.nspec)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{:d}'.format(ii) -> {:d}'.format(ii+1) (?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer Python indexing. That is the way
the spectra are truly indexed anyhow.

@profxj
Copy link
Contributor Author

profxj commented Aug 24, 2017

Merging

@profxj profxj merged commit 813f37a into master Aug 24, 2017
@profxj profxj deleted the multi_spec_in_xspec branch August 24, 2017 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants