hyperspy | Multidimensional data analysis | Data Visualization library

 by   hyperspy Python Version: 2.0rc0 License: GPL-3.0

kandi X-RAY | hyperspy Summary

kandi X-RAY | hyperspy Summary

hyperspy is a Python library typically used in Analytics, Data Visualization applications. hyperspy has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has low support. You can install using 'pip install hyperspy' or download it from GitHub, PyPI.

Multidimensional data analysis
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              hyperspy has a low active ecosystem.
              It has 442 star(s) with 202 fork(s). There are 24 watchers for this library.
              There were 4 major release(s) in the last 6 months.
              There are 211 open issues and 947 have been closed. On average issues are closed in 222 days. There are 38 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of hyperspy is 2.0rc0

            kandi-Quality Quality

              hyperspy has 0 bugs and 0 code smells.

            kandi-Security Security

              hyperspy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              hyperspy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              hyperspy is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              hyperspy releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed hyperspy and discovered the below as its top functions. This is intended to give you an instant insight into hyperspy implemented functionality, and help decide if they suit your requirements.
            • Plot images .
            • Return a list of the supported SPC data types .
            • Perform blind source separation .
            • Read frames from file .
            • Reconstruct the phase of the signal .
            • Compute a quantification of intensities .
            • Creates an eelDB dataset .
            • Perform kramersk - kronigers kramers - correlation .
            • Read a file .
            • Read EDF file
            Get all kandi verified functions for this library.

            hyperspy Key Features

            No Key Features are available at this moment for hyperspy.

            hyperspy Examples and Code Snippets

            No Code Snippets are available at this moment for hyperspy.

            Community Discussions

            QUESTION

            Matplotlib, what to plot in a loop with user input
            Asked 2021-Oct-11 at 13:10

            this is the first time i ask a question in here, so i hope i can ask it correctly any feedback on clarity is also appriciated.

            I am forced to use matplotlib's plot function in the code i am currently writing, due to the datastructure i am working with. But it does not do well with plotting in loops. What i aim to do, with my plot, is to be able to modify a background window determined by the user, and either accept or reject the output. But as i understand there is some conflict between matplotlibs interactive function and the use of a loop. I am relativly new to python, so the code might not be the prittiest, but useually i gets the job done. I am however at a complete loss for the particular problem. I have seen similair problems on the internet, which have been solved with plt.pause('timeinterval') but this is not an option in my case. or atleast i cannot see how i can use it, since i want to wait for user input. I have also tried plt.waitforbuttonpress() but this is not very intuetive, i cannot choose which button it should wait for.

            I guess a third option is to extract the data from the format hyperspy uses and then make a canvas of my own, which forfills my needs, but this is very tidious for me, due to my lack of experience.

            Do anyone have any alternative ways of producing a plot, preferably with matplotlib such that i can achive what i am trying?

            By the way, i have also tried turning off interactive mode, and this does not do the trick unfurtunatly.

            Some information about the specs: This is running on a windows pc, using jupyterlab and python 3.10

            I hope my dilemma is clear.

            ...

            ANSWER

            Answered 2021-Oct-11 at 13:10
            import pandas as pd
            import numpy as np
            import ipywidgets as wg
            from ipywidgets import HBox, VBox
            import matplotlib.pyplot as plt
            from IPython.display import display
            %matplotlib widget
            
            a = np.arange(50)
            b = np.random.rand(50) + a
            c = np.sin(a)
            d = np.cos(b)
            
            df = pd.DataFrame({'a': a,
                               'b': b,
                               'c': c,
                               'd': d})
            
            userinput1 = wg.Text(value="", placeholder='Type something', description='x axis')
            userinput2 = wg.Text(value="", placeholder='Type something', description='y axis')
            buttonplot = wg.Button(description='Plot', disabled=False, button_style='', tooltip='Click me',icon='check')
            buttonout = wg.Output()
            display(HBox((userinput1, userinput2, buttonplot)))
            display(buttonout)
            plt.close()
            fig, ax = plt.subplots()
            def on_click_event(change):
                with buttonout:
                    x = (userinput1.value)
                    y = (userinput2.value)
                    ax.plot(df[x], df[y], label=f'{y}')
                    ax.legend()
            buttonplot.on_click(on_click_event)
            

            Source https://stackoverflow.com/questions/69523854

            QUESTION

            TreeView to JSON in Python
            Asked 2021-Jun-15 at 20:08

            [Edit: apparently this file looks similar to h5 format] I am trying to extract metadata from a file with extension of (.dm3) using hyperspy in Python, I am able to get all the data but it's getting saved in a treeview, but I need the data in Json I tried to make my own parser to convert it which worked for most cases but then failed:

            TreeView data generated

            Is there a library or package I can use to convert the treeview to JSON in pyhton?

            My parser:

            ...

            ANSWER

            Answered 2021-Jun-15 at 20:08

            I wrote a parser for the tree-view format:

            Source https://stackoverflow.com/questions/67988614

            QUESTION

            Converting 32bit float DM4s to signed 16bit
            Asked 2020-Aug-27 at 19:46

            I have a bunch of cryo and liquid cell dm4 images that are 32bit float, but the precision and the large values of 32bit are completely unnecessary, so we've decided to convert them to 16bit signed int.

            I need to preserve the metadata structure that dm4 images have because the images still need to be openable in digital micrograph. So using hyperspy or ncempy is not an option since they can't write dm4 files.

            I currently have a script to do this in dm-script, but it only takes in one directory at a time and doesn't know how to handle liquid cell data. And I am not good enough to do that.

            I was wondering if I could do the same thing in the python interface in DM? Since I can manipulate the file structure and traverse the directories with easily with python.

            The dm script I'm referring to is the on FELMI ZFE DigitalMicrograph Script Database slightly adjusted to allow for signed integers and not creating tiffs since they are not useful for us currently.

            Edit: the dm-script works nicely for now, i am curious if there is a way to pass the source and output directory to my dm-script from the python script. That way i can do all the directory handling in python, and just call the dm-script one folder at a time.

            ...

            ANSWER

            Answered 2020-Aug-27 at 19:46

            Not sure if this is what you're after, but the script below shows how one recursively builds a file-list from all subfolders, filters it by extension, and then act on each of them.

            The current script will open all .dm4 files of a given folder and its subfolders, convert the image into sint16 and resave it with a prefixed name.

            However, you can very easily adjust the script by modifying the method ActOnFile.

            Source https://stackoverflow.com/questions/63616036

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hyperspy

            You can install using 'pip install hyperspy' or download it from GitHub, PyPI.
            You can use hyperspy like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install hyperspy

          • CLONE
          • HTTPS

            https://github.com/hyperspy/hyperspy.git

          • CLI

            gh repo clone hyperspy/hyperspy

          • sshUrl

            git@github.com:hyperspy/hyperspy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link