meeting 2025 06 20 n57 - JacobPilawa/TriaxSchwarzschild_wiki_6 GitHub Wiki

Context

  • We had been working on the N57 spectra for a bit before receiving the N315 report. The diagnostics at the time are spread over a few different bullets, so I wanted to gather the latest N57 diagnostics onto this page. It will likely be a bit all over the place, but should give proper context on where we left off.

  • The diagnostics below are largely coming from the first 6 bullets of the N410 page (here). They were posted here originally since we were doing some bulk testing of N410/N57/N315 all together, and I hadn't created an N57 on the newest TriaxSchwarzschild wiki #6. I tried to trim down the relevant bullets from those pages to contain only the N57 content below.

  • Note that the original N57 page is located here.

  • Summary of the bullets below:

    • 05/08 Page: Not many new diagnositcs here, but contained some useful links to past N57 diagnostic pages.
    • 05/09 Page: Comparisons of some adeg=0 vs. adeg=-1 fits to N57; seemed like the adeg=-1 case were consistently elevated compared to the adeg=0 case.
    • 05/12 Page: Literature search for polynomial diagnostics; plotting value of the polynomial vs. moment "inflation" which seems to be a pretty clear relationship; plotting sigma as a function of the additive degree for each spectrum showing that there is a "sweet spot" for adeg=1/2/3 or so, with polynomial degrees >8 or so being quite erratic; also some attempts at fitting the spectra with the "trimmed" library from Emily
      • This page also contained some comparisons of the spectra after masking a large portion of the wavelength range -- at the time, Emily and I had noticed that the central portion of the spectra seemed to disagree the most between the adeg=-1 and adeg=0 cases. We had hoped that masking a large part of the central part of the wavelength range would ameliorate this issue, but we didn't seem to have much success. It also seemed like the "size" of this discrepency roughly tracked with the sigma inflation, but it wasn't extremely clear why that was the case.
    • 05/22 Page: I left out the diagnostics from this bullet since it wasn't the most optimal test. On this page, I had tried to iteratively trim away the highest weight templates until I converged on the Barth results. However, I had been trimming away the "top" weights rather than removing based on physical reasons (such as spetral type). The next bullet explored this a bit more systematically.
    • 05/28 Page: This was a more principled approach to trimming the template library. Specficially I tracked down the spectral type for all stars in our CAT library, and tried to select only GKM (or GKM Main Sequence stars), but it still was giving a decent amount of scatter vs. Barth only vs. the full library. We hadn't discussed these results that much since the N315 reviewer report was returned to us.

Diagnostics/Page Summaries

  • I'll try to break the results below down by the original page they were on so that we can go back and reference those pages if need be.

05/08/2025 Additive Polynomial Information

  • Note that this page doesn't actually have new diagnostics, but references some of the N57 work we had done, so I included the relevant bits from that page here.

  • Checking out the additive and multiplicative polynomials a bit more carefully here since they seem to be behaving a bit weird.

  • It seems like we did do a bit of testing on the additive and multiplicative polynomials for NGC57

  • Takeaways:

    • It seems I can do a pretty decent job of reproducing Irina's results using the symmetrically-binned data using the settings she lists on BOX/in Massive XIII.
    • One thing I noticed, though, is that the settings that she uses for the Mitchell data appear to use a multiplicative degree of 7 for the data, but still uses an additive polynomial of degree 0. I've never reprocessed the Mitchell spectra so unsure how this was deteremined, or if this should be in the back of our mind when we compare the GMOS and Mitchell data near the overlapping region.
      • We used adeg=0 for N2693/N57, but for N315 we switched it off due to the additive polynomial being quite negative, but I don't think we took a lot of time to understand this or properly test this after we fixed all the spectral fitting issues.
    • When I change the settings on BOX to leave off the additive polynomial, I get some tension in the kinematics. Turning the additive polynomial off seems to raise our moments relative to having the additive polynomial in the mix.

05/09 Refitting Diagnostics

  • Doing some follow up work from the meeting yesterday on the additive polynomials for our old galaxies. I've gone back and refit the spectra using adeg=0 and adeg=-1 for N57, and have some diagnostics below. At this level it does seem like the adeg=-1 cases have elevated moments for N57. With that said, I'm still trying to sort out why this is the case, and if there is any way to justify our current choice of adeg=0 for N57 as we have in the 'publication' so far.

  • So to that end, I've reprocessed the N57 spectra with the settings used in their minimizations, changing only the additive polynomial degree between the two fits.

  • For N57, our final pPXF fits (currently in the paper) used:

    • (Barth stars) + (bias=0.2) + (starting guess=[0,200]) + (adeg=0). The bullet on the 3/17 page which features fits with adeg=-1 were from my attempts at reconciling the new code with the old code. This was prior to fixing the starting guess bug in the new code. The first results for N57 after fixing the starting guess issue are on the 3/19 page.
    • The 3/18 page is very close to the diagnostics below, showing the fits with adeg=0 and adeg=-1, but using the incorrect starting guess (it doesn't seem like the starting guess was as much of an issue for N57 since the spectra all "looked" fine at the time). You're correct that this pages though does seem to show a difference between the adeg=0 and adeg=-1 case, which will be a bit clearer in the plots below.
plots
  • First, here are the key plots showing the preliminary pPXF kinematics for N57 using the settings above, but changing the additive polynomial to either a constant or leaving it off the fit.
  • It does seem like switching the additive polynomial off results in elevated moments. Looking at the spectra at the bottom of this page, it's very surprising since the resulting multiplicative polynomials in general agree really well with one another
N57
  • And here are some diangostics on the fits to the spectra, showing the RMS vs spectrum number:
    • In both cases, the adeg=-1 case are ever-so-subtly worse fit than the adeg=0 case, but this is unsurprising since adeg=0 is effectively a new degree of freedom for the fit.
N57
adeg=0
adeg=-1
  • I've also got the spectra plots here so we can compare fits side-by-side/how the polynomials change when they're included vs excluded.
N57
Adeg=0 Adeg=-1

05/12 Page -- More Additive Polynomial Testing, Trimmed Library Testing

  • Doing some more follow up work on the additive polynomial behavior we are seeing with N57. I'm trying to pin down what exactly is leading to inflated moment values when switching off the additive polynomial.

  • Major Takeaways:

    • There seems to be a clear trend that the size of the additive polynomial correlates with the difference in sigma between the adeg=-1 and adeg=0 cases, with adeg=-1 having "inflated" values.
    • When limiting the fits to only the Barth library, the templates that are preferred are quite different, with the adeg=-1 cases seeming to consistenly prefer three templates, with adeg=0 being slightly more "evenly distributed."
    • The quality of the fits between the adeg=-1 and adeg=0 are virtually identicaly in terms of both RMS and when visually inspecting the spectra.
    • I also ran quite large tests where I fit every spectra with adeg=-1,0,1,2...,20 since there are a few papers below which do this. It does seem like there's quite a bit of variation in particular for orders >=8 or so. There does appear to be, in general, "flat" parts with polynomial orders around 1/2/3 in a great deal of the spectra.
    • I've also tried running N57 with both the Barth stars alone and with the trimmed library Emily had passed my way, and I do seem to be finding a difference in kinematics when using the Barth library vs. the trimmed library for both the adeg=0 and adeg=-1 cases, but I need to look at these a bit closer still.
  • A little bit of background/literature review: I was trying to see if the additive/multiplicative polynomials have been studied before and found a few interesting papers highlighting their importance:

    • Mehrgan+23 seems to encounter a similar phenomenon that we are seeing (in their section 3.3 for example). They state that, at least in their tests, the additive and multiplicative polynomials seem to change the recovered LOSVD shape when the templates used do not contain the "true" spectrum (they have a mock test setup here which allows them to test this exactly). In particular, they argue that polynomials add freedom to the fit to homogenise template mismatches in different spectral regions. So even if the fit is technically getting better in terms of RMS, they say: "The additive/multiplicative polynomials modify the effective template such that template mismatch in Mgb and the Fe features is actually increased. However it is increased in such a way that at the same time the mismatch is homogenized over the wavelength region such that in combination with a respectively distorted LOSVD the fit to the spectrum becomes overall much better."
    • One of Cappellari's recent pPXF papers in Section 6.2 states that "I run models with both multiplicative and additive polynomials degree from mdegree=degree=-1 (i.e. using only attenuation and no polynomials) to degree 4 and found that the solution changes slightly without polynomials but quickly stabilizes as soon as one allows for a non-zero degree" and that his "standard" setup is using adeg=-1, and mdeg=2. This is slightly different than what he says in this paper, which suggest that "I adopt the default degree=4 additive polynomials, but my results are totally insensitive to this choice."
    • The paper Chung-Pei had found which claims sub-percent precision is also slightly different, saying that they find stable results for a range of additive (order 5-7) and multiplicative (1-3) are suitable for the MUSE/KCWI/SDSS data, but they advocate for additive of degree 1 and multiplicative of degree = 0 for JWST data.
    • Throughout all these works (and I think as we have come to understand), folks are saying that the additive polynomials are mostly used in cases where there is imperfect sky subtraction or additional light from something like an AGN.
  • A few other works I've found which seem to test adegree for their fits also find quite a bit of movement in their results:

    • Appendix A finds a ~10 km/s difference depending on the additive polynomial choice, and they ultimately choose adeg=20 due to it "flattening out" in this region.
    • Appendix A here seems to find that velocity dispersion consistently rises with additive polynomial degree, but they say that the smallest change occurs between adeg=10 to 30, so they adopt a value in that range.
    • Figure 14 of this paper seems to show a trend similar to what we find, where sigma seems to be inflated for p=0 (no additive polynomial). They attribute this to "template mismatch"
plots/diagnostics
  • First, here are some plots showing the difference in moment values (adeg=0 minus adeg=-1 cases) plotted as a function of the additive constant used in the fits. There's a very strong trend here indicating the the inflation of moments in the adeg=-1 case (negative values) correlates with the additive polynomial used in the fit. I've highlighted the 10 highest and 10 lowest difference cases for each moment to look at more closely below.
    • The trend is strongest in sigma and seems to get increasingly weaker for the higher order moments, but it's absolutely still present even in the h8 panels.
N57
  • One thing I was interested in checking out -- do the spectra which most strongly disagree have appreciably different template weights? What about the spectra between the adeg=0 and adeg=-1 cases as a whole?
    • So first, here's a comparison of the total template weights for both N57, and I've included a second set of plots comparing the weights for each individual spectrum:
N57
And here are the template weights for the 10 individual high and low set of spectra in both cases. These plot may take a minute to load. **One thing that stands out to meet looking at the "low difference" cases -- it seems like scan603.fits is preferred in a lot of the adeg=-1 cases, but doens't make as frequent of an appearance in the adeg=0 cases.**
N57
high difference
low difference
Associated Spectra
  • And here's the spectra associated with the 10 high and the 10 low differences:
N57: High Differences
Adeg=0 Adeg=-1
N57: Low Differences
Adeg=0 Adeg=-1
Sigma as a function of adeg for each spectrum
  • One thing I wanted to try was, for each spectrum, fit the data with a range of additive polynomials like some of the papers at the top do. I've done this for N57, and will put plots below. Still need to look at this a bit more carefully/cross check with the actual spectra and template diagnositcs above.
    • Note that the leftmost point in each panel has adeg=-1 (aka no additive polynomial).
  • Takeaways:
    • It seems like polynomials order ~8 and above lead to some quite erratic behavior in the kinematics. There are often huge jumps for these higher polynomial orders, or very large disagremeents with the lower order polynomials. It also seems like, for the most part, very high polynomial orders result in very low sigma values.
    • For N57: it does seem like low order polynomials are the most stable, and it seems like the "peak stability" is around an order of 1, 2, or 3. Even then, however, there is still a bit of movement in the sigma values when changing the polynomial order, though it would be good to have a sense of the error bars on these fits, too. I'll try to run one of those cases this afternoon.
Sigma as a function of adeg for the N57 spectra
Plot Zoomed
Some Trimmed Template Library Testing
  • I've started reprocessing the N57 with the trimmed CAT library Emily sent earlier this week and will put up some diagnostics here as they come in.
  • Using the trimmed library, it seems like the adeg=0 case (our current fiducial N57 case) agrees better when swapping out the libraries but there is still quite a bit of scatter in both instances (the adeg=-1 and adeg=0 cases). The RMS of the spectra are virtually identical, and I'm not seeing anything too bizarre in the individual spectra which makes this all that much more frustrating.
Adeg=0 Library Comparison Adeg=-1 Library Comparison
  • And here are side-by-sides of the RMS vs spectra number of these cases:
Adeg=0 Adeg=-1
Barth
Trimmed
And I've included the large spectra fit plots here for the trimmed library fits. It may take a minute to load these
Adeg=0 Adeg=-1
05/16/2025 Spectra Work: checking out differences between the spectra fits themselves
  • After meeting with Emily yesterday, we decided that it's probably best to look at the actual difference between the spectra between the adeg=0 and adeg=-1 fits, hoping to maybe see features in the residuals which correlate with the sigma difference. At least for N57, it sort of seems like the central portion of the wavelength range has quite a large misfit between the two cases, and this seems to be correlated with the difference in sigma. This part of the spectrum does have some very strange sky lines in many of the spectra, and so I suspect that potentially masking larger fractions of this region near ~8600 Angstroms could potentially improve the situation. I'm running some of those tests now.

    • I'm also making equivalent diagnostics when varying the template library to see if there are additional correlated features there, including correlations with features in the template spectra themselves.
  • For now, here's a large plot comparing the difference in the best-fitting preliminary spectra for the adeg=0 and adeg=-1 cases. Specfically, I'm plotting the difference between adeg=0 and adeg=-1. I've ordered them from the smallest difference to largest difference (basically in order of how extreme the inflation is):

N57
  • Given this, I wanted to see if we can isolate any of the difference to the mask itself, or if there are still other issues driving these differences. So I've refit N57 two more times, one in which I mask a large chunk of the "middle" part of the spectral range, and another where I fit the spectra without a mask at all. The diagnostics for these tests are below.
Testing Masking a Large Range in the Middle vs. No Mask
Here are the spectral fits when using the original mask, a large mask over the central region, and no mask on the data for the 10 spectra I had highlighted above (which had the largest differences between the adeg=0 and adeg=-1 cases. Note I've got two sets here, one which uses adeg=0 (fiducial case) and one that uses adeg=-1.
Original Mask Large Mask No Mask
adeg=0
adeg=-1
  • And here are the kinematics plotted against each other for these cases:
Original Mask vs. Large Mask Original Mask vs. No Mask
adeg=0
adeg=-1

05/22 Page -- Trimming Away the Template Library

  • I'm leaving this section blank for now since I don't think it's particularly relevant. I had tried trimming away the full library until I obtained equivalent results to the Barth subset, but the way I was trimming away templates was suboptimal (throwing way the highest weight templates each time).
  • The full set of diagnostics is if you're curious.

05/28 Page -- More Methodically Trimming Away the Templates, Sigma Clipping, and Multiplicative Polynomial Follow Up

Multiplicative Polynomial Follow Ups
  • First, here's a quick test in which I vary the multiplicative polynomial in a similar way of varying the additive polynomial from last time. I ran this for both N57 and N410 using both adeg=0 and adeg=-1, but the results are quite consistent throughout. It seems like we need a multiplicative order >=3 or so (which we're currently using) for the results to stabilize. Using lower orders seems to cause quite a bit of variability (and the fits themselves were not great as I glanced at them):
The plots for this test are a bit large, so they may take a minute to load.
N57
adeg=0
adeg=-1
Sigma Clipping on N57
  • I've also run the sigma clipping routine on the N57 spectra so we can better assess whether or not the mask is causing us any issues. It seems like there is really nice agreement between my original mask from box and the sigma clipping routine for sigma = 2.0, 2.5, 3.0.
  • Here's both the spectra fits and the resulting 1-to-1 plots of the kinematics:
Spectral fits using the sigma clipping routine and adeg=0
Original Mask Sigma = 2.0 Sigma = 2.5 Sigma = 3.0
Spectral fits using the sigma clipping routine and adeg=-1
Original Mask Sigma = 2.0 Sigma = 2.5 Sigma = 3.0
  • And the corresponding 1-to-1 plots (with the fiducial kinematics using Barth + no sigma clipping + adeg=0 on the x-axis):
Sigma=2.0 Sigma=2.5 Sigma=3.0
adeg=0
adeg=-1
Library Follow Up
  • Last time, I had been trimming away from the "trimmed library" suboptimally -- I had been discarding the highest weight spectra until I had started to see some of the Barth stars appear in the "preferred" templates, but it's probably better to trim away bad stars first, and then assess the fits.
  • So to do this, I've taken a closer look at the templates and their reported spectral types, and have some follow ups below.
First, here's a large plot containing all 209 stars from the trimmed library
Trimmed Library Spectra
  • And here's what the distribution of spectral types look like for the "trimmed" library:
    • Note that there are two categories which appear in the plot which are not actually spectral types. There are 10 stars which are not matched on SIMBAD (I can check these out more carefully but wanted to move forward for now), which get labelled as "N" due to being "Not Found" in the database. Theres another star that is listed as a type "kA9hF2mF2(IV)" star, which is the lowercase "k" entry.
Trimmed Library Spectral Type Distribution
  • And for reference, here's the Barth stars along with their spectral types:
Filename Star Spectral Type
0 scan399.fits HD121146 K2IV
1 scan411.fits HD125560 K3III
2 scan419.fits HD129312 G7IIIa
3 scan437.fits HD136028 K2/3III
4 scan574.fits HD188056 K3IIICN2
5 scan603.fits HD199580 K1IV
6 scan612.fits HD203344 K0III
7 scan669.fits HD221148 K3-IIIbFe2
8 scan194.fits HD12929 K2-IIIbCa-1
9 scan216.fits HD19476 G9.5IIIb
10 scan219.fits HD20893 K3III
11 scan272.fits HD49293 K0+III
12 scan274.fits HD51440 K2III
13 scan286.fits HD58207 G9IIIb
14 scan304.fits HD69267 K4IIIBa0.5:
ONLY GKM Stars
  • My first pass at trimming this library is to select only the G/K/M stars but include all non-main sequence stars:
Here's what the actual spectra look like for this subset:
GKM Spectra
  • And here's the spectral type distribution for this case:
GKM Stars Spectral Type Distribution
  • And using only these GKM stars for the spectral fitting, here is the resulting 1-to-1 plot:
Barth vs. GKM Stars
ONLY GKM Main Sequence Stars
  • As a second pass, I've excluded non-main sequence stars from the library (which isn't necessarily what we should do, but I wanted to test this anyway):
Here's what the actual spectra look like for this subset:
GKM Main Sequence Spectra
  • And here's the spectral type distribution for this case:
GKM Main Sequence Stars Spectral Type Distribution
  • And using only these GKM Main Sequence Stars, here's the resulting 1-to-1 plot of the kinematics:
Barth vs. GKM Stars


⚠️ **GitHub.com Fallback** ⚠️