Giter VIP home page Giter VIP logo

fold_slice's Issues

implement coarse position correction

Currently the best way to correct large position errors in ptychography is to do low-resolution reconstruction using cropped data. However, sometimes reconstruction may fail if diffraction patterns are too small, preventing position correction at large pixel size.
I think it's possible to do coarse (or any arbitrary pixel size) during the position correction step by resizing the object and the probe. Thus one can use large diffraction patterns and still perform efficient position correction.

object constraints in GPU engines do not work for multiple scans with shared object

In ptycho_solver.m, the loop "ll = 1:max(par.object_modes, par.Nscans)" for object constraints (e.g. apply_smoothness_constraint) will result in error if multiple scans share the same object. In this case, the number of object modes is less than par.Nscans.
Need to find a way to determine the correct number of objects based on eng. share_object.

Matlab bugs & issues

A collection of Matlab bugs people may encounter when using fold_slice:

  1. Matlab 2023b: Sometimes, the h5write function may throw out a "File or folder not found" error depending on the system.

singleslice not work in GPU_MS engine

if using 1 layer and GPU_MS engine, the probe is not in the center but the corner. The object is basically random.
of course we can use GPU instead of GPU_MS, but I think it's good to make single slice work in GPU_MS engine too.

load ptychographic reconstruction multiple times

Add a feature to try loading a ptychographic reconstruction several times before throwing out an error. This could be useful for large-scale tomography processing and when the data drive is unstable.

optimize sample thickness during multi-slice ptycho reconstruction

I think it's possible to make use of existing code to optimize sample thickness (delta_z) during GPU_MS reconstruction.

Functions worth checking out:
+GPU_MS/LSQML.m
+GPU_MS/private/gradient_NF_propagation_solver.m
+ML_MS/gradient_ptycho_MS.m
+ML_MS/calc_ms_grad.c

use multiple object layers for position correction

It might be useful to do position correction on multiple object layers in multi-slice ptychography.
One way is to calculate position updates using each object layer and then "average" them at the end of an iteration.

fmask with the same size of the data is a bad design

the matrix for storing bad pixels, fmask is always the same size as all the diffraction patterns, 3D. For data as large as 256^4, the fmask can use memory (GPU!) up to 16 GB! For most of the data, fmask may not change for different diffraction, then fmask should only be a single 2D matrix instead of 3D. Even if fmask is pattern dependent, bad pixels are only a small fraction. Using the indexes of bad pixels instead of a 3D matrix with many ones can save a lot of memory.

implement the arbitrary-path fly-scan ptychography algorithm

https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-26-10-12585&id=386092

Michal's current implementation has very limited use. Need to improve the GPU engine for applications at the APS.

Checkpoints:
Scan positions

  • Linear trajectory: perfectly rectangular grid
  • Linear trajectory: rectangular grid w. missing scan points
  • Linear trajectory: rotated rectangular grid
  • Continuous trajectory
  • Load external positions

Algorithm:

  • Probe initialization
  • Mixed-state + arbitrary-path fly-scan
  • Constant vs. varying probe intensity
  • Position correction
  • Variable probe correction
  • Online FSC estimation

FSC calculation for multi-slice reconstruction

The online FSC estimation code in +engines/+GPU_MS/+analysis/ does not work because the engine no longer supports multiple-scan reconstruction.
Need to use external scripts to calculate FSC score for multi-slice reconstructions.

Functions worth checking out:
ptycho/+core/+analysis/calc_FSC.m and aligned_FSC_template.m

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.