Showing posts with label diffraction. Show all posts
Showing posts with label diffraction. Show all posts

2019-12-13

#MLringberg2019, day 5

Today was the final day of Machine Learning Tools for Research in Astronomy. I gave my talk, which was about causal structure. One thing I talked about is the strong differences (stronger than you might think) between generative and discriminative directions for machine learning. Another thing I talked about is the way that machine-learning methods can be used to denoise, deconvolve, and separate signals when they are designed with good causal structure.

Right after me, Timmy Gebhard (MPI-IS and ETH) gave an absolutely excellent talk about half-sibling regression ideas related to instrument calibration (think Kepler, TESS, and direct imaging). He beautifully explained exoplanet direct imaging and showed how his improvements to how they are using the data change the results. He doesn't have the killer app yet, but he is spending the time to think about the problem deeply. And if he switched from one-band direct imaging to imaging spectroscopy (which is the future!) I think his methods will kill other methods. He also spoke about the causal-inference philosophy behind his methods really well.

My talk slides are here and I also led the meeting summary discussion. My summary slides are here. The summary discussion was valuable. In general, the size and style of the meeting—and location in lovely Ringberg Castle—led to a great environment and culture at the meeting. Plus with great social engineering by Ntampaka, Nord, Pillepich, and Peek. The latter made progress on a community-driven set of Ringberg Recommendations, which might end up as a long-term outcome of the meeting.

2016-09-02

#AstroHackWeek, day five

Last day of #AstroHackWeek! What a week it has been, for me, anyway. So many projects. In the final wrap-up session, I was just blown away by each hack and accomplishment. You can get some feel for it at the hackpad. That site is subject to change and editing, so it isn't a static result, but you should still get a sense of the awesome.

In the wrap-up, Matt Mechtley (ASU) surprised me by showing that our molecular reconstruction does not depend extremely sensitively on the assumption that the molecules are viewed from an isotropic direction distribution! That is, he generated data with a (very strong) dipole pattern in the direction distribution, not aligned with any symmetry of the molecule, and we still reconstruct well. That bodes very well for the method.

Earlier in the day, I discussed with Dalya Baron (TAU) what directions to move in on the molecular imaging project. She decided to move the model towards the proper diffraction imaging model, with the photons generated not by the molecule directly in real space but by the squared norm of the Fourier Transform of the molecule. Because our methodology depends on having correct, analytic derivatives of a marginalized likelihood, this requires taking our derivatives through a sum of products of Fourier Transformed basis functions and their complex conjugates. Oddly, Baron wants to figure that out and code it up! (Oh, and unit tests, of course.) I'm impressed, and excited about the results. Watch this space.

2016-06-02

talking stats at the mathematicians

I spent a very large part of the day today at the whiteboard in front of Charlie Epstein (Penn), Leslie Greengard, Jeremy Magland (SCDA), and Marina Spivak (SCDA). I presented my proposed solution to the problem of diffraction imaging of molecules in the limit of very few photons per exposure. We had a brief discussion of the physics, a very long discussion of the idea of solving this problem by optimizing a marginalized likelihood, and a brief discussion of its derivatives with respect to parameters in a representation. It was an incredibly useful session: The crowd found some mistakes on my part, and it forced me to clearly articulate how I think probabilistic inference works in these cases.


I think my proposed solution is palatable to both Bayesians and frequentists: In principle the frequentists should object to my marginalization over angles, but this is close to unassailable, because when the angles are generated by an isotropic process, they really do have a well-defined distribution that does not have to be described as a prior. That is, this integral is frequentist-safe. In principle the Bayesians should object to the fact that I am going to optimize the (marginalized) likelihood rather than fully sample the posterior, but even hard-core Bayesians recognize that sometimes you can't afford to do more than get the peak and its width!

Amusing notes from the chat: My definition of “principled” is very different from Leslie Greengard's! And the crowd was not as confident as I am that I can solve a problem where the intermediate steps to the answer require as much disk storage space as exists in all of facebook (note the reference to “1011 to 1017 numbers” on the board).

2016-05-31

yet more derivatives

I spent the day working out derivatives of my diffraction imaging model with respect to parameters. The crazy thing is that there is a sum over components in the density model (for the molecule) and then a sum over photons within the image (or instance) and then a sum over orientation-angle samples, and finally a sum over images (or instances). And various of these sums have logs and exps inside them. So it is a mess! I wrote them out with a pen on paper, and then typed them up in a nascent paper. The short-term plan is to get to stochastic gradient.

2015-10-28

ages of stars, overlaps of sets

In the morning Keith Hawkins (Cambridge) showed up for my group meeting. He made the strong argument that if we could measure stellar ages, we could see structure in the Milky Way that won't be revealed by (blunt) chemical tracers alone. I agree, and he came to the right place!

In the afternoon at the SCDA, Charlie Epstein (Penn) gave Magland and me some very good arguments or intuitions about the chaotic map we have been playing with in the phase-retrieval problem. He argued that the projection operators can be designed to greatly increase the effective overlap of sets for which the map is looking. Recall that the goal is to find the overlap of two sets. In the conversation, he effectively generalized the concept of “reflection” (which might be, for example, across a line) to the equivalent for any kind of set (that is, for things other than lines and points). Awesome!

2015-10-23

magic of mathematics

I spent my research time today in Magland's office, watching him explore the magic of the iterated maps I discussed yesterday. To recap: These are chaotic maps that do not optimize any scalar objective function (that we know) but which are attracted to fixed points that are related to (project to) solutions of the equations we want (phase retrieval with arbitrarily good data). We wondered how the author of these maps created them; we tried experiments in which we parameterized various choices and saw which maps work and which don't. We wondered about possible connections to MCMC, which is a stochastic iterated map (these are deterministic). The math is magical.

2015-10-14

optimization

In the phase-retrieval problem, there are many objective functions one can write down for the problem, and many optimizers one can use, and many initializations, and many schedules for switching among objectives and optimizers. I spent my research time today playing in this playground. I got nothing awesome—everything gets stuck in local optima (not surprisingly).

One of the optimization methods I figured out turns the problem into a quadratic program with quadratic constraints (QCQP). This is convex if the constraints themselves are properly signed. They aren't! When they aren't, QCQP is apparently NP-Hard. So either this is going to be a tough optimization or else I am going to solve P = NP! Have I mentioned that I hate optimization?

2015-10-09

phase retrieval

I came back from #AstroHackWeek and #DSEsummit all fired up to work on Cryo-EM, but then Leslie Greengard, Charlie Epstein (Penn) and Jeremy Magland (SCDA) distracted me on the phase retrieval problem: In one-dimensional problems, if you know the squared amplitude of the Fourier transform of an all-positive function on a bounded domain, you do not know the function: There are true degeneracies. In higher dimensions, there are degeneracies possible, but generic two-d and three-d all-positive scenes in bounded domains are uniquely specified by the norm of the Fourier transform the vast majority of the time. Or so we think. There are arguments, not proofs, I believe. Anyway, Magland has coded up (an improved version of) one of the standard algorithms for retrieving the phases of the Fourier transform and spent the last week or two testing and adjusting it. He seems to find that the solutions are unique, but that they are very hard to find. We spent the day arguing around this. I am trying not to get sucked in!

2015-09-17

transforms of mixtures of Gaussians

I spent the day writing code to create mixtures of Gaussians and (importantly) their Fourier transforms. I can't count the number of times I have written mixtures-of-Gaussians code! But each use case is at least slightly different. Today the application is diffraction microscopy. I want to explore bases other than the standard grid-of-pixels basis.

The funny thing about the diffraction-microscopy problem is that it is simultaneously trivial and impossible: It is to infer all the phases of the Fourier transform given only a noisy, censored measurement of its square modulus. All the approaches that work apply very informative priors or regularization. My biggest concern with them is that they often put the most informative part of the prior on the space outside the object. Hence my goal of using a basis that is compact to begin with.

As a teaser and demo, here is an unlabeled set of figures that “test” my code: