Giter Club home page Giter Club logo

surfalize's Issues

Gaussian kernel ISO 16610-21/-61

Dear Frederic,

  • in filter.py line 46 you have the conversion from cut off wavelength to sigma
46: return cutoff / (2 * np.sqrt(2 * np.log(2)))
  • kernel according to ISO 16610-21 and -61 $s(u) \propto \exp(-\pi (\frac{u}{\alpha \lambda_c})^2)$ where $\alpha = \sqrt{\frac{\log(2)}{\pi}}$
  • Gaussian as of ndimage: $g(u) \propto \exp(-\frac{1}{2} (\frac{u}{\sigma})^2 )$
  • i.e. $\frac{1}{2 \sigma^2} = \frac{\pi}{(\alpha \lambda_c)^2}$
  • inserting $\alpha = \sqrt{\frac{\log(2)}{\pi}}$ we obtain $\frac{1}{2 \sigma^2} = \frac{\pi^2}{\log(2) \lambda_c^2}$
  • i.e. $2 \sigma^2 = \log(2) (\frac{\lambda_c}{\pi} )^2$
  • i.e. $\sigma = \sqrt{\frac{\log(2)}{2}} \frac{\lambda_c}{\pi}$
  • therefore, could it be that in line 46 of filter.py you might have ment?
46: return (cutoff/np.pi) * (np.sqrt(np.log(2)/2))

Best wishes - Dorothee

Bug: ModuleNotFoundError: No module named 'sklearn' after installing

Hey, I wanted to try out the library, but unfortunately I can't get past the installation process.
When importing into my Python notebook I get the error " ModuleNotFoundError: No module named 'sklearn' "

I am using python 3.11. Installing sklearn does not fix the error.

Similar scope repo - Surfile

Dear @fredericjs @kierenwang @wayofsamu,
in 2022 at INRIM (Italy NMI) and PTB (Germany NMI) we started the development of a package that focuses on form removal, microscope parameter estimation, PSD evaluation, etc. and we are currently thinking about future software developments to expand the capabilities of our package.
Two months ago, we published the first release on zenodo: https://zenodo.org/records/10727546
This is the github repo: https://github.com/andeledea/surfile

A few days ago, we found your repo and wondered what your affiliation is, and whether a collaboration is possible to make the two packages compatible.
Please let us know your opinion on this matter, and also if there is a more 'official' way to contact you, as we could not find your contact information.

Regards
Andrea

Decode option for other encoding than UTF-8

I tried the package but I met an error about the decoding.

I should be nice if we can modify the encoding, such as 'utf-8' to 'latin-1' during Surface.loads.
For instance I worked with a file encoded as latin-1 and two changes were needed :

encoding='latin-1'

In read_binary_layout

if isinstance(unpacked_data, bytes):
            unpacked_data = unpacked_data.decode(encoding).strip()

And a strip apply with '\x00' in get_unit_conversion that sometimes breaks the code for kind unit.

Returns
    -------
    factor: float
        Factor by which to multiply the original values.
    """
    from_unit = from_unit.strip('\x00')   <------- HERE
    if from_unit not in UNIT_EXPONENT or to_unit not in UNIT_EXPONENT:

Help with OPD binary files

Hello,

Firstly, thank you for your contribution and sharing your work.

I have a collection of OPD binary files from Wyko hardware. I attempted to export them using Gwyddion software to SUR format. However, Surfalize is unable to read the resulting files. Could you recommend me a workflow to obtain a format compatible with Surfalize?

Thank you in advance.

P.S.: Is there any plan to support XYZ format?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.