Giter VIP home page Giter VIP logo

ptypy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ptypy's Issues

Redesign of data import

The default pipeline should be simplified for straightforward cases while keeping more advanced features. For this, one could rehabilitate the DataSource class, which currently is not useful. Consider the possibility of having Ptypy act as a daemon, with data reading provided by completely separate processes.

MPI data preparation

Data preparation sometime fails when running with MPI. We should either debug this or consider falling back to single-process data preparation.

Multi-pass model construction

The model construction currently is a nested loop very difficult to update. A more flexible option would be to have a multi-pass approach that starts with a "vanilla pod" and gradually builds the model depending on input parameters. A new feature in the model would be added as an additional pass.

Profiling

As a first step for acceleration. Anybody identifying obvious bottlenecks please report as a new issue.

Implement 3PIE

Support for multiple focal planes within object array.

Unpack/repack container arrays

If the data is straightforwardly homogeneous, adding methods to unpack / repack numpy arrays would help testing and hacking.

Unique location for default parameters

Currently, default parameters are stored at the beginning of multiple files. These parameters are also stored in the file resources/parameter_descriptions.csv.

This information should not be duplicated, and all defaults should be drawn from a unique point, the csv file. We should also consider introducing a more robust validation of the input parameters. Most of the code is ready in utils/validator.py.

All this might have to be done after the transition Param -> treeDict (issue #17)

Parameters

I vote for permanently changing things in geometry:

energy : stays , switch to electron Volts instead of keV or use actual SI unit. Actually the input here is not so super self explaining
z -> distance
psize_det -> psize or pixelsize
psize_sam -> resolution
N -> shape
lam -> we could decide to permanently discard this one. However a dumb user would mor likely put an SI unit here

Semi-automatic reconstruction setup

Write heuristic functions that attempt to load data and build parameters from incomplete input, for fast deployment and testing of code on a new setup.

The Richardson Lucy deconvolution in PtyScan is non-canonical

The RL-deconvolution procedure in data.PtyScan consumes a dispropotionate amount of parameters and is non-canonical in its execution. I presume deconvolution has to happen before rebinning? Since the correction is non-linear and also not entirely "common" I very much advise to shift the deconvolution to a subclass. This step may require to outsource the rebinning part of prepocessing in a separate function.

Fix csaxs test

Currently it looks for tree.bmp via a relative path, we should make a function in the test dir that just retrieves the filepath whereever we are.

Unit testing

Many many tests should be added, especially for data preparation recipes and engines.

ptypy-dev -> ptypy

The renaming just took place. Please watch out next time you clone push or pull.

Interactive pipeline helper

When working interactively it would be convenient to provide a helper function that guides the user to the next steps in the Ptycho preparation.

The role of load_positions

The documentation of ptypy.core.data.PtyScan.load_positions(), currently says that "If parallel reads or log file parsing for each set of frames is not a time critical issue of the subclass, reimplementing this function can be ignored and it is recommended to only reimplement the :py:meth:load method.".

I am not sure if this is a good recommendation. Whether it is expansive or not, providing a way to access all positions in a scan is a useful feature. I would say that this is the recommended way of loading positions, and that alternative per-frame version should be used only if it is not possible to do otherwise...

Implement ePIE

Now that patent issues are solved we can provide an ePIE implementation without risk.

GPU acceleration

Any initial test is most welcome. Options are

  • OpenMP
  • OpenCL
  • Arrayfire
  • Cuda
  • Maybe others...

Test requirements

Adding test should be easy. Ptypy should have a framework of guidelines to do this. Then, we would encourage all new features to come with their own set of tests and example code.

Interactive subpackage for ipython

Introduce ptypy.interactive or ptypy.consoletools with functions to load data, setup the pods, run the engines, etc, à la matlab and pylab. This would help for debugging and developing new ideas.

Support Fourier ptychography

Any suggestion for this is welcome. The problem is nearly identical, what would be needed mostly is mapping of parameter names.

Implement adaptive deconvolution

A convolution kernel representing the detector PSF or partial coherence can be refined iteratively during the reconstruction. This is active research - how can this be tied nicely to mixed states features?

Validate ML code

The ML code in ptypy has never been tested as thoroughly as in its ancestor ptycho.

"POD.exit" should be allocated only if needed.

To make POD's behaviour uniform, a "fake" exit view self._exit is created in POD.__init__. This is a waste of memory. Possible solution: create the array on-the-fly when POD.exit is accessed, or store the array as a class variable (which would have to depend on the geometry).

Accelerate FFTs

Check whether pyFFTW would do a better job. Large diffraction patterns (for NF-ptychography) could benefit from parallelised FFTs, but a proper implementation of this could be very tricky.

Travis CI

Get started registering on Travis CI automatic testing.

Support for statistical weight

Currently the data preparation allows for statistical weights to be defined, but further on these weights are interpreted as boolean masks. This is inconsistent and should be handled much better, especially when working with ML.

PEP8

Finalise PEP8 standards throughout.

New data viewer

One nice idea would be to have a html5 client for real-time data visualisation and additional interactions such as pausing, changing parameters on-the-fly, etc.

Compilable propagators

Propagator is probably the most obvious first step for optimisation. A user switch has to be provided in the input parameters to decide to use compiled or native python code.

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.