POSTDOCTORAL SCHOLAR AT UCLA
I am a postdoctoral scholar in Prof. Tuan Do's group at the University of California, Los Angeles, and received my Ph.D. in Physics from the University of California, San Diego in 2025. I build scientific software, probabilistic models, and deep-learning inference tools for large astronomical datasets: computer vision on telescope images, Bayesian inference and MCMC, neural posterior estimation, and high-performance Python. Along the way I have turned slow research code into fast pipelines, including a 600× faster neural inference model, a 67× parallelized geometry algorithm, and a 500–1000× batched fitting engine in an open-source package.
I am interested in roles in scientific computing, software engineering, and machine learning engineering.
The Nuclear Star Cluster at the center of the Milky Way is one of the most crowded fields in the sky: a single James Webb Space Telescope image contains more than 300,000 stars. I am building a precise astrometry pipeline that measures proper motions from JWST NIRCam images, fitting the point-spread function iteratively and registering images across pointings by KD-tree matching, over about 2 TB of imaging data. With it, I model the stellar density profile to separate the Nuclear Star Cluster from the nuclear stellar disk, and characterize the cluster's internal kinematics to test predictions of how it formed.
Inferring a star's properties from its spectrum normally means running MCMC for every star. We trained a neural network once and then inferred posteriors directly. I generated 50,000 simulated spectra and trained a ResNet-GRU feature extractor with a normalizing flow on GPUs to infer five stellar parameters. Amortized inference brought the cost per star from about 30 minutes to 3 seconds, and the posteriors agreed with MCMC, including the correlations between parameters.
Westerlund 1 is the most massive young star cluster in the Milky Way. Using multi-epoch Hubble Space Telescope data, I analyzed its structure and unusual initial mass function, separated cluster members from field stars with Gaussian mixture models and simulated stars, measured mass segregation with minimum spanning trees, and fit the cluster's structure and dynamics with Bayesian inference. Computing the density maps above was the main bottleneck. I rewrote it with image super-sampling, parallel point-in-polygon tests, and distributed Dask-GeoPandas, cutting the runtime from 45 minutes to 40 seconds (67×).
The Orion Nebula Cluster is the nearest site of ongoing massive star formation. I built a pipeline that merges catalogs from Keck, Hubble, Gaia, and APOGEE through SQL (ADQL) queries and cross-matching. I then forward-modeled high-resolution Keck spectra with MCMC and nested sampling to measure each star's velocity and properties with uncertainties. The resulting 3D velocity map shows that lower-mass stars move faster relative to their neighbors, which I compared with hydrodynamical simulations of cluster formation.
Planets close to their star can be destabilized by a distant companion, while general relativity can protect them. I derived an analytical criterion that predicts whether such a system stays stable, and validated it against N-body simulations integrated for up to 170 million years, run with Rings-GR, a C simulator I extended with general relativity. The criterion replaces costly simulations and can rule out where undiscovered companions may hide.
FlyStar originally fit each star's motion one at a time with an iterative optimizer. Every motion model in it is linear in its parameters, so I replaced the per-star loop with closed-form weighted least squares solved for all stars at once. The fits run 500–1000× faster on catalogs of 10,000+ stars, and the speed-up grows with catalog size. I also cut alignment memory use by about half, and added unit tests, documentation, and PyPI packaging.
Department of Physics and Astronomy
University of California, Los Angeles
Los Angeles, CA 90095
Email: lwei@astro.ucla.edu
GitHub · LinkedIn · Google Scholar · ORCID · CV