Showing posts with label spectroscopy. Show all posts
Showing posts with label spectroscopy. Show all posts

2026-02-15

number of exposures per visit?

I wrote code this weekend to look at the question of how we should visit a star in the upcoming Terra Hunting Experiment. The current (straw-person) plan is that we will observe each visible star once per night for ten years, with one exposure of a sensibly-chosen exposure time at each visit. Is this a good idea? I was interested in this problem for two reasons. The first is that binning is sinning, with the corollary that bigger bins are worse than finer bins, and a single, long exposure is a very big bin. The second reason is that when there are non-trivial noise sources (like the quasi-periodic variations from p-mode oscillations of the surfaces of Sun-like stars), a few negatively- (or interestingly-) correlated noise draws can be combined in ways that are substantially more informative than by taking the average.

Of course, if you split an exposure (with a standard CCD, say) into sub-exposures, you take on real costs: There is a read time, which is time you aren't integrating, and there is a read noise, that affects each new exposure. So the best strategies are a complicated function of read time, read noise, and the signal-to-noise at which the stellar p-mode oscillations are visible in any realistic data. Related: There are amazingly different and interesting strategies with up-the-ramp detectors that are used in the infrared.

One final comment is that the objective, in my strongly held view, is to optimize the amount of information (about, say, the center-of-mass radial-velocity changes of the target star) per unit wall-clock time. We are paying for wall-clock time; let's get as much as we can out of it.

2025-11-21

substellar objects (brown dwarfs)

I spent the day at the NSBP / NSHP meeting in San José. My favorite session of the day was the morning astro session, which was entirely about brown dwarfs. I learned a lot in a very short time. Caprice Phillips (UCSC) introduced the session with an introduction to the scientific and technical questions in play. She put a lot of emphasis on using binaries and clusters to put detailed abundance ratios onto substellar objects. This was what I expected: I thought (walking in to this session) that all known abundance ratios for brown dwarfs were from such kinds of studies. I learned different (keep reading).

Gabriel Munoz Zarazua (SFSU) followed by showing spectra from M-dwarfs, brown dwarfs, and Jupiter. It definitely looks like a sequence. He does spectral fitting (what they call, in this business, retrievals). It looks like he is getting very good, somewhat precise, abundance ratios for the photospheres of substellar objects! I asked more about this in the question period, and apparently I am way behind the times (Emily Rauscher, Michigan, helpfully pointed this out to me): Now brown-dwarf photosphere models are so good, they can be used to measure abundances, and pretty well.

I also learned in this session (maybe from Jorge Sanchez, ASU, or maybe from Efrain Alvarado, SFSU) that there is a very strong mass–abundance relation in the Solar System. That is, we don't expect, if brown dwarfs form the way planets do, that the detailed abundances of the brown dwarfs will match exactly the detailed abundances of the primary stars. But now we are really in a position to test that. Sanchez showed that we can get, from even photometry, abundances for substellar objects in the Milky Way halo. Again, totally new to me! And he finds metallicities at or below −3. Alvarado showed data on an amazing system J1416, which is an L–T binary with no stellar companion. Apparently it is the only known completely substellar binary.

2025-07-23

finding emission lines (and other oddities) in hot stars

I showed my robust spectral decomposition (dimensionality reduction) and residuals to the MPIA Binaries group today. There was much useful feedback (including that my H-gamma was actually H-delta; embarassing!). One comment was that the model isn't truly a causal separation between star and lines, so there will be some mean lines in the star model; lines aren't entirely outliers. That's true! The group suggested that I iterate to remove stars with lines from the training set.

After the meeting, I implemented some of that, but problems like this have a pathology: If you carefully remove stars with high residuals at some wavelength, then the training data will be deficient, or low, at that wavelength. And then the model will go lower, and then more stars will have excess at that wavelength and: Disaster. So when I implemented, I required a 2-sigma deviation, and I removed both high and low outliers. I don't know if this will work, but I am testing now.

2025-07-19

young stars in SDSS-V

Over the last two weeks, I built a new robust dimensionality-reduction method called Robust-HMF. This method is a hammer, looking for a nail. This week, Hans-Walter Rix (MPIA) suggested that I use the method on young stellar objects observed in SDSS-V BOSS spectra. I did that, and I found hundreds of young stars with narrow H-alpha emission lines. It turns out that the Robust-HMF method does really well on these data; it can fit all the absorption lines in the stars, plus all the wacky continuum shapes generated by a combination of instrumental effects and dust attenuation. That is, I can run the method on more-or-less raw data, provided that it has been shifted to rest frame (and the raw SDSS-V pipelines do that pretty well on stars like these).

Anyway, I don't know what to say about my results quantitatively yet, but I find hundreds of emission-line stars, and my equivalent-width sensitivity is excellent. Who wants this sample?

2025-07-13

robust matrix factorization

There is a very nice algorithm and set of methods called “Robust PCA,” originating in a paper by Candès. This method makes use of ideas from convex optimization to simultaneously learn a low-rank representation of the data plus a sparse representation for the outliers. This kind of situation comes up in astronomy all the time.

Way back, Tsalmantza and I made a replacement for PCA called HMF that deals with heteroskedastic data (variable error bars or variable data weights) and also missing data; we used it to build low-rank models of quasar spectra. This weekend I built a robust version of HMF (Robust HMF maybe?) that uses ideas from iteratively reweighted least squares to mimic the algorithm behind Robust PCA. It works! And it works well. Unfortunately, right now the investigator has to tune the rank of the low-rank part and also the soft outlier cutoff used in the IRLS. I would love to figure out principled ways to choose both. If you want to follow along, development is happening here for now.

2025-07-08

robust dimensionality reductions

Dimensionality reduction (the basic being PCA) is very sensitive to outliers: A single bad pixel can dominate most objectives and thus create a spurious dimension. One of the best and most classic solutions to this is the robust PCA method, which is presented in a (very long) paper with impressive math and beautiful results. Yesterday Hans-Walter Rix (MPIA) and I coded it up and applied it to ESA Gaia RVS spectra, with extensive (and impressive) help from Claude. It looks very promising, especially in capturing oddities in hot stars. Today I worked out that there should be something similar that takes into account data weights (inverses of squared uncertainties), and I wrote down the algorithm (on paper). We'll see.

2025-07-07

stellar twins vs synthetic stellar twins

In the Milky Way meeting at MPIA today, a bit of a discussion broke out about using stellar twins, inspired by work by Yuan-Sen Ting (OSU). The idea is: If you have two stars with very similar overall metallicity, and very similar temperature and surface gravity, then it should be possible to measure accurate element abundnace anomalies between the two stars, even in the absence of an extremely accurate spectral synthesis code.

My view, which does not contradict this point, is that an even better way to use this stellar-twin idea is to synthesize a twin for every star, using stars that are similar in (either) parameters or else spectral space. After all, an interpolation to your target star should more accurately represent it than even the most similar individual comparison star. That idea, fundamentally, is the main idea behind The Cannon.

2024-03-12

The Cannon and El Cañon

At the end of the day I got a bit of quality time in with Danny Horta (Flatiron) and Adrian Price-Whelan (Flatiron), who have just (actually just before I met with them) created a new implementation of The Cannon (the data-driven model of stellar photospheres originally created by Melissa Ness and me back in 2014/2015). Why!? Not because the world needs another implementation. We are building a new implementation because we plan to extend out to El Cañon, which will extend the probabilistic model into the label domain: It will properly generate or treat noisy and missing labels. That will permit us to learn latent labels, and de-noise noisy labels.

2024-03-10

APOGEE spectra as a training set

I spent a lot of the day building a training set for a machine-learning problem set. I am building the training set out of the SDSS-V APOGEE spectra, which are like one-dimensional images for training CNNs and other kinds of deep learning tasks. I wanted relatively raw data, so I spent a lot of time going deep in the SDSS-V data model and data directories, which are beautiful. I learned a lot, and I created a public data set. I chose stars in a temperature and log-gravity range in which I think the APOGEE pipelines work well and the learning problem should work. I didn't clean the data, because I am hoping that contemporary deep learning methods should be able to find and deal with outliers and data issues. If you want to look at my training set (or do my problem set), start here.

2024-03-09

getting the absolutely rawest APOGEE data

I spent time today (at the bar!) understanding the data model and directory structure for the raw, uncalibrated APOGEE data. The idea is that I want to do a real-data example for my paper with Casey (Monash) on combining spectra, and I want to get back to the raw inputs. I also might use these spectra for a problem set in my machine-learning class. The code I wrote is all urllib and request and re, because I think it is necessary to read directories to understand the data dependencies in the survey. Is that bad?

Putting aside my concerns: The coolest thing about this project is that the SDSS family of projects (currently SDSS-V) puts absolutely every bit of its data on the web, in raw and reduced form, for re-analysis at any level or stage. That's truly, really, open science. If you don't believe me, check out this this code that spelunks the raw data. It's all just URL requests with no authentication!

2024-03-08

combining spectral exposures

I wrote words! I got back to actually doing research this week, in part inspired by a conversation with my very good friend Greg McDonald (Rum & Code). I worked on the words in the paper I am finishing with Andy Casey (Monash) about how to combine individual-visit exposures into a mean spectrum. The biggest writing job I did today was the part of the paper called “implementation notes”, which talks about how to actually implement the math on a finite computer.

2024-01-08

auto-encoder for calibration data

Connor Hainje (NYU) is looking at whether we could build a hierarchical or generative model of SDSS-V BOSS spectrograph calibration data, such that we could reduce the survey's per-visit calibration overheads. He started by building an auto-encoder, which is a simple, self-supervised generative model. It works really well! We discussed how to judge performance (held-out data) and how performance should depend on the size of the latent space (I predict that it won't want a large latent space). We also decided that we should announce an SDSS-V project and send out a call for collaboration.

[Note added later: Contardo (SISSA) points out that an autoencoder is not a generative model. That's right, but there are multiple definitions of generative model; only one of which is that you can sample from it. Another is that it is a parameterized model that can predict the data. Another is that it is a likelihood function for the parameters. But she's right: We are going to punk parts of the auto-encoder into a generative model in the sense of a likelihood function.]

2023-11-29

Terra Hunting Fall Science Meeting, day 3

Today was a delight! In a working session, Clark Baker (Cambridge) gave a beautiful, conceptual and concrete description of how an echelle spectrograph works and the blaze and the resolution and etc. My favorite moment was the aha! moment I had when he described the Littrow condition. This was followed by Alicia Anderson (Cambridge) explaining how the data reduction proceeds. Then she and Federica Rescigno (Exeter) helped us install the data-reduction software for the ESO instruments (ESPRESSO, HARPS-N, etc) and we started reducing raw echelle data.

Before all this there was a wide-ranging discussion of measuring 3-point functions of radial-velocity time series data. This was inpired by the question: Is a Gaussian process a good model for these data? I hope this turns into a project or set of projects.

2023-11-28

Terra Hunting Fall Science Meeting, day 2

So many good things happened in the meeting today! Highlights were presentations by Niamh O'Sullivan (Oxford) Ben Lakeland (Exeter) who showed amazing results running models of stellar variability on data from the Sun. O'Sullivan can see that the sun goes through many different phases of spots, granulation, and super-granulation. She finds these by fitting Gaussian processes of certain forms. Related: Suzanne Aigrain (Oxford) showed that even in very gappy data, the GP fits are unbiased, whereas naive use of periodograms is biased!

Lakeland showed that super-granulation can in principle be modeled in the Solar time series, and maybe the tiniest hint that when he corrects for super-granulation well, the RV variability might be even lower than at times at which there is no super-granulation in play at all. Does super-granulation suppress other kinds of variability?

I'm very optimistic—between Liang yesterday, Zhou's work at Flatiron, and these presentations—that we will be able to mitigate many difficult sources of stellar variability. I was inspired to outline a conceptual paper on why or how this is all going to work.

2023-11-27

Terra Hunting Fall Science Meeting, day 1

Today was the first day of the Terra Hunting annual science meeting. One highlight of the day was a presentation by Yan Liang (Princeton), who is modeling stellar spectral variability (the tiny variability) that affects extremely precise radial-velocity measurements. Her method involves a neural network, which is trained to distinguish RV variations and spectral shape variations through a self-supervised approach (with a data augmentation). Then it separates true stellar RV variations from spectral-variability-induced wrong RV variations by requiring (essentially) that the RV variations be uncorrelated with the (latent) description of the stellar spectral shape. This connects to various themes I am interested in, including wobble by Bedell, a spectral variability project by Zhao, and causal structure in machine learning.

2023-11-07

abundance gradients wrt positions or actions

It is traditional to plot things like the mean iron abundances of stars (or ratios of magnesium to iron, or other ratios) as a function of position in the Galaxy. However, stars change their positions over time, so the gradients (the features in any abundance–position plots) will be smeared out over cosmic time by their motions.

At the same time, stars have approximately invariant actions or integrals of motion, which don't change (much) as they orbit. These invariants are only approximate, both because the Galaxy isn't exactly integrable, and also because we don't know or measure everything we need to compute them precisely for any observed star.

Putting these two ideas together, the abundance–action features, or really abundance–invariant features should be much clearer and more informative than the abundance–position features. Awesome, let's go! The only problem is: Selection effects are often simple in the position space, but are almost never simple in the dynamical-invariant-space. So any plots are harder to interpret generally.

These are issues that I have discussed over many years with Hans-Walter Rix (MPIA). Today I discussed them with Danny Horta (Flatiron) and Adrian Price-Whelan (Flatiron), in preparation for an exploratory study by Horta.

2023-11-06

predicting spectra from spectra

Saakshi More (NYUAD) came into my office during office hours today to ask about possible data science projects in physics. I pitched to her predicting ESA Gaia RVS spectra from Gaia XP spectra, and vice versa. Has anyone done that? In one direction, you have to predict high resolution detail from low-resolution input; in the other direction, you have to predict a wide wavelength range from narrow input. It seems like perfect for something like a linear auto-encoder (at least for a small patch of the color–magnitude diagram; non-linear for a large patch). Later in the day I talked to Gaby Contardo and she said: If you want to go simple, how about nearest neighbor? Good idea!

2023-11-02

toning down my language

I spent travel time (at airports and on airplanes) working on the title, abstract, and introduction of the forthcoming paper with Andy Casey (Monash) about combining visit spectra into mean spectra. This was mainly about me changing the tone from “You are all doing it wrong!” to a tone more like “Here's a way to think about it, and the consequences thereof.” After all, no method is the best for all situations and cases. Our method is best for situations where the individual visit spectra are barely sampled or under-sampled.

2023-11-01

M dwarfs

I had a great phone call with Madyson Barber (UNC) and Andrew Mann (UNC) today about M dwarf stellar spectroscopy. I love the problem of understanding the spectra of M dwarfs because this is a subject where there is no ground truth: No physical models of M dwarf photospheres work very well! Why not? Probably because they depend on lots of molecular transitions and band heads, the properties of which are not known (and very sensitive to conditions).

I love problems where there is no ground truth! After all, science as a whole has no ground truth! So the M-dwarf spectroscopy problem is a microcosm of all of science. I went off the deep end on this call, and we were all left knowing less than we knew when we started the call. By this post, I apologize to Barber and Mann.

2023-10-25

information theory for spectroscopy

I had a meeting this morning with Megan Bedell (Flatiron) about our dormant paper about information theory and extreme-precision radial-velocity measurements. We see the paper a bit differently (is it about methods or is it about concepts?), but we were able to re-state a scope with which we are both happy. We assigned tasks (Bedell writing and me coding, mainly), and promised to make progress before next week. It is very, very, very hard to finish a paper! Especially when all authors are above some seniority, where they spend most of their time with others. I would love to get a lot more personal coding time!