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

Fix signal registration #25

Merged
merged 6 commits into from
Apr 29, 2020
Merged

Conversation

ericpre
Copy link
Contributor

@ericpre ericpre commented Apr 29, 2020

Now the signal should be registered and setting the signal_type will assign to the correct class when loading data or changing class (dimension change or from to lazy signal).

  • Fix signal registration,
  • remove unnecessary boiling plate code,
  • add test.

To verify:

>>> import hyperspy.api as hs
>>> hs.print_known_signal_types()
+----------------------------+----------------------------------+----------------------------+----------+
|        signal_type         |             aliases              |         class name         | package  |
+----------------------------+----------------------------------+----------------------------+----------+
|           CL_SEM           |  CLSEM, cathodoluminescence SEM  |       CLSEMSpectrum        | lumispy  |
|          CL_STEM           | CLSTEM, cathodoluminescence STEM |       CLSTEMSpectrum       | lumispy  |
|             CL             |     CL, cathodoluminescence      |         CLSpectrum         | lumispy  |
|     DielectricFunction     |       dielectric function        |     DielectricFunction     | hyperspy |
|          EDS_SEM           |                                  |       EDSSEMSpectrum       | hyperspy |
|          EDS_TEM           |                                  |       EDSTEMSpectrum       | hyperspy |
|            EELS            |             TEM EELS             |        EELSSpectrum        | hyperspy |
|             EL             |     EL, electroluminescence      |         ELSpectrum         | lumispy  |
|          hologram          |                                  |       HologramImage        | hyperspy |
|        Luminescence        |       LuminescenceSpectrum       |        LumiSpectrum        | lumispy  |
|        Luminescence        |     TRLumi, TR luminescence      |       LumiTransient        | lumispy  |
|             PL             |      PL, photoluminescence       |         PLSpectrum         | lumispy  |
+----------------------------+----------------------------------+----------------------------+----------+

@jordiferrero jordiferrero merged commit e005406 into LumiSpy:master Apr 29, 2020
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.

2 participants