Skip to content

Commit

Permalink
Marcosertoli/xrcs wavelenght hack (#288)
Browse files Browse the repository at this point in the history
* Adding capability of recomputing rho-poloidal if fbnd or faxs are corrupted.

* Adding capability of recomputing rho-poloidal if fbnd or faxs are corrupted.

* Merging latest reader mods from st40

* Fixed linting issue

---------

Co-authored-by: Marco Sertoli <[email protected]>
  • Loading branch information
marcosertoli and marcosertoli authored Sep 21, 2023
1 parent 677dcd1 commit 0ef4332
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion indica/models/diode_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
filter_fwhm: float = 1, # 1
filter_type: str = "boxcar",
etendue: float = 1.0,
calibration: float = 2.0e-5,
calibration: float = 1,
instrument_method="get_diode_filters",
channel_mask: slice = None, # =slice(18, 28),
):
Expand Down
4 changes: 2 additions & 2 deletions indica/readers/read_st40.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def plot_profile(
def __call__(
self,
instruments: list = [],
revisions: list = None,
revisions: dict = None,
map_raw: bool = False,
tstart: float = None,
tend: float = None,
Expand All @@ -317,7 +317,7 @@ def __call__(
if len(instruments) == 0:
instruments = INSTRUMENTS
if revisions is None:
revisions = [0] * len(instruments)
revisions = {instrument: 0 for instrument in instruments}
if tstart is None:
tstart = self.tstart
if tend is None:
Expand Down
11 changes: 7 additions & 4 deletions indica/readers/st40reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,14 @@ def _get_helike_spectroscopy(
direction = np.array([direction])

results["times"], _ = self._get_signal(uid, instrument, ":time", revision)
results["wavelength"], _ = self._get_signal(
uid, instrument, ":wavelength", revision
)
wavelength, _ = self._get_signal(uid, instrument, ":wavelength", revision)
# TODO: change once wavelength in MDS+ has been fixed to nanometers!
results["wavelength"] /= 10.0
wavelength /= 10.0
if self.pulse >= 10307:
dlambda = float(np.abs(wavelength[1] - wavelength[0])) * 4
wavelength += dlambda
results["wavelength"] = wavelength

for q in quantities:
qval, q_path = self._get_signal(
uid, instrument, self.QUANTITIES_MDS[instrument][q], revision
Expand Down

0 comments on commit 0ef4332

Please sign in to comment.