[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EVB0085QSJ372RTD3QJ74R":3,"skill-same:01M7EVB0085QSJ372RTD3QJ74R":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EVB0085QSJ372RTD3QJ74R","photometry-pipelines",null,"Measuring brightness from images — aperture and PSF photometry, calibration to standard systems, and light curves.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-photometry-pipelines\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: photometry-pipelines\ndescription: Measuring brightness from images — aperture and PSF photometry, calibration to standard systems, and light curves.\ncategory: scientific\n---\n\n## Overview\n\nPhotometry converts pixel counts into physical fluxes and magnitudes —\nthe basis of light curves, color–magnitude diagrams, and transient\ndetection. This skill covers aperture and PSF-fitting photometry, sky\nbackground handling, calibration to standard systems (zero points, color\nterms, extinction), and building reliable light curves.\n\n## When to use\n\n- Measuring magnitudes of stars, galaxies, or transients in images\n- Building light curves: variable stars, exoplanet transits, supernovae, AGN\n- Calibrating instrumental magnitudes to a standard system (SDSS, Pan-STARRS, Gaia)\n- Doing difference imaging for transient detection\n- Deciding between aperture and PSF photometry for a field\n\n## Core concepts\n\n- **Magnitude system:** m = −2.5 log₁₀(F) + ZP — logarithmic, relative; the zero point (ZP) ties instrumental counts to physical flux. Colors (differences of magnitudes) cancel the ZP.\n- **Aperture photometry:** sum flux in a circular aperture, subtract sky from an annulus — simple, robust for isolated sources; aperture corrections account for flux outside the aperture (curve of growth).\n- **PSF photometry:** fit the point-spread function (DAOPHOT\u002FDoPhot\u002Fphotutils) — mandatory in crowded fields; yields better precision and deblending at the cost of complexity.\n- **Sky background:** the dominant error source for faint sources — measure locally (annulus or background mesh), watch for gradients and contamination by neighbors.\n- **Calibration ladder:** instrumental mag → zero point (standard stars in the field) → color terms (filter mismatch) → atmospheric extinction (airmass correction) → standard system. Each rung needs doing.\n- **Differential photometry:** for light curves, measure target relative to stable comparison stars in the same frame — cancels clouds, airmass, and most systematics without absolute calibration.\n\n- **Difference imaging (DIA):** subtracting a reference template isolates variable sources in crowded fields — the standard for microlensing, supernova, and dense-cluster transient searches; convolution matching (Alard–Lupton) is the core algorithm.\n- **Crowded-field PSF fitting:** DAOPHOT\u002FDoPhot iteratively fit and subtract stars — aperture photometry is simply wrong in globular clusters and the Galactic bulge; use the right tool for the field.\n- **Color terms:** filter+detector response never exactly matches the standard system — the linear (sometimes quadratic) color term in the calibration equation absorbs the mismatch; skipping it leaves 0.05–0.2 mag systematics.\n\n## Practical workflow\n\n### 1. Prepare and detect\n\n```python\nfrom photutils.detection import DAOStarFinder\nfrom photutils.background import Background2D, MedianBackground\nbkg = Background2D(data, box_size=64, filter_size=3,\n                   bkg_estimator=MedianBackground())\nfinder = DAOStarFinder(fwhm=4.0, threshold=5.0 * bkg.background_rms)\nsources = finder(data - bkg.background)\n```\n\n1. Work on calibrated (bias\u002Fdark\u002Fflat-corrected) images; estimate and subtract background with a mesh, checking for over-subtraction around bright sources.\n2. Detect at ≥5σ; set FWHM from measured stars, not guesses.\n3. Choose aperture radius ~1.5–2× FWHM for the measurement aperture, sky annulus starting ~3× FWHM — then derive aperture corrections from bright isolated stars.\n\n### 2. Measure\n\n1. **Sparse fields:** aperture photometry with local sky; apply curve-of-growth aperture corrections per frame.\n2. **Crowded fields:** build an empirical PSF from isolated stars; fit with PSF photometry; iterate (subtract neighbors, refit).\n3. Record per-source uncertainties: photon noise + sky noise + read noise — and check that the scatter of constant stars matches the error model (it should, within ~10–20%).\n\n### 3. Calibrate\n\n1. Match to a reference catalog (Pan-STARRS, SDSS, Gaia synthetic photometry, APASS) with proper cross-matching radius and quality cuts.\n2. Fit ZP + color term: m_std = m_inst + ZP + c × color; fit per frame or per night; check residuals vs magnitude, color, and position (spatial trends mean flat-field or illumination problems).\n3. Correct atmospheric extinction via airmass (m₀ = m − kX) when comparing across elevations; better yet, calibrate each frame independently.\n\n### 4. Build light curves\n\n1. Use differential photometry against an ensemble of comparison stars (weighted mean); reject variable comparisons by their own scatter.\n2. Detrend systematics (airmass, seeing, position on chip) — but verify the \"trend\" isn't the astrophysical signal (compare detrended vs raw).\n3. For transits\u002Fperiodicity: normalize out-of-transit baseline, then run BLS\u002FLomb-Scargle; always phase-fold and inspect by eye — algorithms find periods in noise.\n\n### 5. Run a transient-detection pipeline\n\n1. Build a deep reference template from the best-seeing images; difference each new image with PSF-matched convolution.\n2. Detect on the difference image (≥5σ), then vet: reject subtraction artifacts (dipoles from misregistration), asteroids (motion between exposures), and variable stars (catalog cross-match).\n3. Force-photometer the candidate position on all epochs — including pre-discovery non-detections, which constrain the explosion\u002Fbrightening time.\n\n## Common pitfalls\n\n- **Aperture photometry in crowded fields:** neighbor flux contaminates both aperture and sky annulus — switch to PSF fitting.\n- **Global sky subtraction:** a single background value across a frame with gradients or nebulosity biases faint sources — go local.\n- **Catalog mismatch:** calibrating against a catalog in a different filter system without color terms — systematic errors of 0.05–0.2 mag.\n- **Underestimated errors:** photon-noise-only error bars ignore flat-fielding, sky estimation, and systematics — validate against constant-star scatter.\n- **Detrending away the signal:** aggressive systematics removal can erase shallow transits or slow variables — detrend conservatively and compare.\n- **Saturation blindness:** saturated stars have flat-topped profiles and garbage magnitudes — flag and exclude above the linearity limit.\n- **Aperture corrections from the wrong stars:** deriving corrections from saturated or crowded stars corrupts every magnitude — use bright, isolated, unsaturated stars only.\n- **Ignoring correlated noise:** resampled\u002Fstacked images have correlated pixels — naive sky-noise estimates understate uncertainties; measure noise empirically from blank regions.\n","## Overview\n\nPhotometry converts pixel counts into physical fluxes and magnitudes —\nthe basis of light curves, color–magnitude diagrams, and transient\ndetection. This skill covers aperture and PSF-fitting photometry, sky\nbackground handling, calibration to standard systems (zero points, color\nterms, extinction), and building reliable light curves.\n\n## When to use\n\n- Measuring magnitudes of stars, galaxies, or transients in images\n- Building light curves: variable stars, exoplanet transits, supernovae, AGN\n- Calibrating instrumental magnitudes to a standard system (SDSS, Pan-STARRS, Gaia)\n- Doing difference imaging for transient detection\n- Deciding between aperture and PSF photometry for a field\n\n## Core concepts\n\n- **Magnitude system:** m = −2.5 log₁₀(F) + ZP — logarithmic, relative; the zero point (ZP) ties instrumental counts to physical flux. Colors (differences of magnitudes) cancel the ZP.\n- **Aperture photometry:** sum flux in a circular aperture, subtract sky from an annulus — simple, robust for isolated sources; aperture corrections account for flux outside the aperture (curve of growth).\n- **PSF photometry:** fit the point-spread function (DAOPHOT\u002FDoPhot\u002Fphotutils) — mandatory in crowded fields; yields better precision and deblending at the cost of complexity.\n- **Sky background:** the dominant error source for faint sources — measure locally (annulus or background mesh), watch for gradients and contamination by neighbors.\n- **Calibration ladder:** instrumental mag → zero point (standard stars in the field) → color terms (filter mismatch) → atmospheric extinction (airmass correction) → standard system. Each rung needs doing.\n- **Differential photometry:** for light curves, measure target relative to stable comparison stars in the same frame — cancels clouds, airmass, and most systematics without absolute calibration.\n\n- **Difference imaging (DIA):** subtracting a reference template isolates variable sources in crowded fields — the standard for microlensing, supernova, and dense-cluster transient searches; convolution matching (Alard–Lupton) is the core algorithm.\n- **Crowded-field PSF fitting:** DAOPHOT\u002FDoPhot iteratively fit and subtract stars — aperture photometry is simply wrong in globular clusters and the Galactic bulge; use the right tool for the field.\n- **Color terms:** filter+detector response never exactly matches the standard system — the linear (sometimes quadratic) color term in the calibration equation absorbs the mismatch; skipping it leaves 0.05–0.2 mag systematics.\n\n## Practical workflow\n\n### 1. Prepare and detect\n\n```python\nfrom photutils.detection import DAOStarFinder\nfrom photutils.background import Background2D, MedianBackground\nbkg = Background2D(data, box_size=64, filter_size=3,\n                   bkg_estimator=MedianBackground())\nfinder = DAOStarFinder(fwhm=4.0, threshold=5.0 * bkg.background_rms)\nsources = finder(data - bkg.background)\n```\n\n1. Work on calibrated (bias\u002Fdark\u002Fflat-corrected) images; estimate and subtract background with a mesh, checking for over-subtraction around bright sources.\n2. Detect at ≥5σ; set FWHM from measured stars, not guesses.\n3. Choose aperture radius ~1.5–2× FWHM for the measurement aperture, sky annulus starting ~3× FWHM — then derive aperture corrections from bright isolated stars.\n\n### 2. Measure\n\n1. **Sparse fields:** aperture photometry with local sky; apply curve-of-growth aperture corrections per frame.\n2. **Crowded fields:** build an empirical PSF from isolated stars; fit with PSF photometry; iterate (subtract neighbors, refit).\n3. Record per-source uncertainties: photon noise + sky noise + read noise — and check that the scatter of constant stars matches the error model (it should, within ~10–20%).\n\n### 3. Calibrate\n\n1. Match to a reference catalog (Pan-STARRS, SDSS, Gaia synthetic photometry, APASS) with proper cross-matching radius and quality cuts.\n2. Fit ZP + color term: m_std = m_inst + ZP + c × color; fit per frame or per night; check residuals vs magnitude, color, and position (spatial trends mean flat-field or illumination problems).\n3. Correct atmospheric extinction via airmass (m₀ = m − kX) when comparing across elevations; better yet, calibrate each frame independently.\n\n### 4. Build light curves\n\n1. Use differential photometry against an ensemble of comparison stars (weighted mean); reject variable comparisons by their own scatter.\n2. Detrend systematics (airmass, seeing, position on chip) — but verify the \"trend\" isn't the astrophysical signal (compare detrended vs raw).\n3. For transits\u002Fperiodicity: normalize out-of-transit baseline, then run BLS\u002FLomb-Scargle; always phase-fold and inspect by eye — algorithms find periods in noise.\n\n### 5. Run a transient-detection pipeline\n\n1. Build a deep reference template from the best-seeing images; difference each new image with PSF-matched convolution.\n2. Detect on the difference image (≥5σ), then vet: reject subtraction artifacts (dipoles from misregistration), asteroids (motion between exposures), and variable stars (catalog cross-match).\n3. Force-photometer the candidate position on all epochs — including pre-discovery non-detections, which constrain the explosion\u002Fbrightening time.\n\n## Common pitfalls\n\n- **Aperture photometry in crowded fields:** neighbor flux contaminates both aperture and sky annulus — switch to PSF fitting.\n- **Global sky subtraction:** a single background value across a frame with gradients or nebulosity biases faint sources — go local.\n- **Catalog mismatch:** calibrating against a catalog in a different filter system without color terms — systematic errors of 0.05–0.2 mag.\n- **Underestimated errors:** photon-noise-only error bars ignore flat-fielding, sky estimation, and systematics — validate against constant-star scatter.\n- **Detrending away the signal:** aggressive systematics removal can erase shallow transits or slow variables — detrend conservatively and compare.\n- **Saturation blindness:** saturated stars have flat-topped profiles and garbage magnitudes — flag and exclude above the linearity limit.\n- **Aperture corrections from the wrong stars:** deriving corrections from saturated or crowded stars corrupts every magnitude — use bright, isolated, unsaturated stars only.\n- **Ignoring correlated noise:** resampled\u002Fstacked images have correlated pixels — naive sky-noise estimates understate uncertainties; measure noise empirically from blank regions.\n",{"name":5,"category":24,"description":7},"scientific","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-photometry-pipelines",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill photometry-pipelines",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill photometry-pipelines",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill photometry-pipelines","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-photometry-pipelines\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]