Skip to content

Issue341 indchauto#343

Merged
lasofivec merged 15 commits intodevelfrom
Issue341_indchauto
Feb 6, 2020
Merged

Issue341 indchauto#343
lasofivec merged 15 commits intodevelfrom
Issue341_indchauto

Conversation

@Didou09
Copy link
Copy Markdown
Member

@Didou09 Didou09 commented Feb 6, 2020

Motivations:

  • On IRFM intra servers, with IMAS, when loading a diagnostic ids, the index of the channels to be loaded (indch) can be done automatically (if indch_auto = True).
    The method for choosing automatically was not accurate and robust enough.

Main changes:

  • new method Multi.inspect_channels() to inspect the contant of each channel easily to help the user decide which indices to put in indch. This method also automatically selects the most relevant set of indices and recommends it to the user.
  • This PR also solves PR fix issue #310 #313 by incorporating its main changes

Example (only on IRFM intra):

In [1]: import tofu as tf                                                                                                                                                                                                                                                          
multi ^[[A/Home/DV226270/ToFu_All/tofu_git/tofu/tofu/__init__.py:95: UserWarning: 
The following subpackages are not available:
    - tofu.mag
  => see print(tofu.dsub[<subpackage>]) for details.
  warnings.warn(msg)

In [2]: multi = tf.imas2tofu.MultiIDSLoader(ids=['polarimeter', 'bremsstrahlung_visible'], synthdiag=True, shot=55983)                                                                                                                                                             
Getting ids             [occ]  tokamak  user         version  shot   run  refshot  refrun
----------------------  -----  -------  -----------  -------  -----  ---  -------  ------
bremsstrahlung_visible  [0]    west     imas_public  3        55983  0    -1       -1    
core_profiles           [0]    "        "            "        "      "    "        "     
equilibrium             [0]    "        "            "        "      "    "        "     
polarimeter             [0]    "        "            "        "      "    "        "     
pulse_schedule          [0]    "        "            "        "      "    "        "     
wall                    [0]    "        "            "        "      "    "        "     

In [3]: multi.inspect_channels('polarimeter')                                                                                                                                                                                                                                     
index  fangle    los_ptsRZPhi  names   
-----  --------  ------------  --------
0      (0,)      (2, 3)        Channel0
1      (0,)      (2, 3)        Channel0
2      (24191,)  (2, 3)        Channel0
3      (24191,)  (2, 3)        Channel0
4      (24191,)  (2, 3)        Channel0
5      (24191,)  (2, 3)        Channel0
6      (24191,)  (2, 3)        Channel0
7      (24191,)  (2, 3)        Channel0
8      (24191,)  (2, 3)        Channel0
9      (24191,)  (2, 3)        Channel0

 => recommended indch = [2, 3, 4, 5, 6, 7, 8, 9]

Issues:

Fixes, in devel, issue #341

@pep8speaks
Copy link
Copy Markdown

pep8speaks commented Feb 6, 2020

Hello @Didou09! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-02-06 12:34:01 UTC

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 6, 2020

Codecov Report

Merging #343 into devel will decrease coverage by 0.16%.
The diff coverage is 1.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #343      +/-   ##
==========================================
- Coverage   40.03%   39.87%   -0.17%     
==========================================
  Files          79       79              
  Lines       24128    24188      +60     
==========================================
- Hits         9659     9644      -15     
- Misses      14469    14544      +75
Impacted Files Coverage Δ
tofu/geom/_plot.py 65.55% <ø> (+0.45%) ⬆️
tofu/geom/_def.py 66.84% <ø> (+0.36%) ⬆️
tofu/imas2tofu/_core.py 0.65% <0%> (-0.02%) ⬇️
tofu/geom/_core.py 63.06% <12.5%> (-0.02%) ⬇️
tofu/utils.py 48.11% <33.33%> (-0.05%) ⬇️
tofu/data/_core_new.py 13.15% <0%> (-0.47%) ⬇️
tofu/geom/_core_optics.py 14.35% <0%> (-0.35%) ⬇️
tofu/geom/_comp.py 59.69% <0%> (-0.22%) ⬇️
tofu/data/_core.py 38.79% <0%> (-0.18%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45b1595...0d52ecf. Read the comment docs.

@lasofivec lasofivec merged commit e88dd10 into devel Feb 6, 2020
@Didou09 Didou09 deleted the Issue341_indchauto branch February 6, 2020 15:15
@Didou09 Didou09 mentioned this pull request Feb 25, 2020
@Didou09 Didou09 mentioned this pull request Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants