Plot relative/normalized to a band other than V - #71
Conversation
|
@mdecleir - code I used to make plots with different normalizations for our slack discussion. Figured I should generate the PR. Have a look when you get a chance. |
mdecleir
left a comment
There was a problem hiding this comment.
I had a quick look at the code, and I think the calculations are not correct given the units of the extinction curve. I would need to run the code with different examples (alax=True, alax=False, different bands) to double check the outcome in the different cases.
|
|
||
| plot_rel_band : str [default=None] | ||
| plot relative to this band | ||
| if None then use the existing relative band (often V) |
There was a problem hiding this comment.
Should add that this is only if alax=True (if alax=False, this keyword will be ignored).
| (bindx,) = np.where(self.names["BAND"] == self.type_rel_band) | ||
| ax = self.exts["BAND"][bindx[0]] + av | ||
| else: | ||
| raise ValueError("type_rel_band not band extinctions") |
There was a problem hiding this comment.
not in band extinctions?
| if self.type_rel_band != "V": | ||
| if self.type_rel_band in self.names["BAND"]: | ||
| (bindx,) = np.where(self.names["BAND"] == self.type_rel_band) | ||
| ax = self.exts["BAND"][bindx[0]] + av |
There was a problem hiding this comment.
I don't think this is calculation correct. self.exts is already in "alav" units at this point (see line 1000)...
| ax = av | ||
|
|
||
| # get the conversion to another relative band | ||
| if plot_rel_band is not None: |
There was a problem hiding this comment.
I think this should only happen if alax=True?
| if plot_rel_band is not None: | ||
| if plot_rel_band in self.names["BAND"]: | ||
| (bindx,) = np.where(self.names["BAND"] == plot_rel_band) | ||
| eval = self.exts["BAND"][bindx[0]] |
There was a problem hiding this comment.
Same remark as before, we have to be careful with the units of self.exts here...
|
Will try and work on this PR soon. Either to close it or update it to remove conflicts and address the PR review comments. |
Add in option to change the relative band in plot.