{"id":31844813,"url":"https://github.com/strampelligiovanni/straklip","last_synced_at":"2025-10-12T07:49:46.804Z","repository":{"id":295084043,"uuid":"704710933","full_name":"strampelligiovanni/StraKLIP","owner":"strampelligiovanni","description":"An HST pipeline  for reducing wide-field imaging observations not specifically designed for High Contrast Imaging analysis. Published in Strampelli et al. 2022.","archived":false,"fork":false,"pushed_at":"2025-07-05T12:55:09.000Z","size":11508,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T13:34:03.066Z","etag":null,"topics":["binaries","data-analysis","data-reduction","direct-imaging","exoplanets","high-contrast-imaging","hst","wide-field-surveys"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strampelligiovanni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-13T22:10:03.000Z","updated_at":"2025-07-05T12:54:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfaa9139-0929-44e4-9755-8b5e1dce9c97","html_url":"https://github.com/strampelligiovanni/StraKLIP","commit_stats":null,"previous_names":["strampelligiovanni/straklip"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/strampelligiovanni/StraKLIP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strampelligiovanni%2FStraKLIP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strampelligiovanni%2FStraKLIP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strampelligiovanni%2FStraKLIP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strampelligiovanni%2FStraKLIP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strampelligiovanni","download_url":"https://codeload.github.com/strampelligiovanni/StraKLIP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strampelligiovanni%2FStraKLIP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010667,"owners_count":26084785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binaries","data-analysis","data-reduction","direct-imaging","exoplanets","high-contrast-imaging","hst","wide-field-surveys"],"created_at":"2025-10-12T07:49:45.009Z","updated_at":"2025-10-12T07:49:46.792Z","avatar_url":"https://github.com/strampelligiovanni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StraKLIP\n\nWe present a new pipeline developed to detect and characterize faint astronomical companions at small angular \nseparation from the host star using sets of wide-field imaging observations not specifically designed for \nHigh Contrast Imaging analysis. The core of the pipeline relies on Karhunen-Lo`eve truncated transformation \nof the reference PSF library to perform PSF subtraction and identify candidates. Tests of reliability of detections \nand characterization of companions are made through simulation of binaries and generation of Receiver Operating \nCharacteristic curves for false positive/true positive analysis. The algorithm has been successfully tested on \nlarge HST /ACS and WFC3 datasets acquired for two HST Treasury Programs on the Orion Nebula Cluster. \nBased on these extensive numerical experiments we find that, despite being based on methods designed for \nobservations of single star at a time, our pipeline performs very well on mosaic space based data. \nIn fact, we are able to detect brown dwarf-mass companions almost down to the planetary mass limit. \nThe pipeline is able to re- liably detect signals at separations as close as ≳ 0.1′′ with a completeness \n'of ≳ 10%, or ∼ 0.2′′ with a completeness of ∼ 30%. This approach can potentially be applied to a wide variety \nof space based imaging surveys, starting with data in the existing HST archive, near-future JWST mosaics, \nand future wide-field Roman images.\n\nSource: Strampelli, G.~M., Pueyo, L., Aguilar, J., et al.\\ 2022, \\aj, 164, 147. doi:10.3847/1538-3881/ac879e\n\nNOTE: This paper, while describing the same steps this last version of the StraKLIP pipeline goes though, \nstill refer to the an older version of the pipeline. While still valid in concept, the actual structure of the pipeline \nmight be slightly different from what described there.\n\n# Pipeline Quick Start Guide\n\n## Pipeline Setup\nCreate a pipeline environment using the `straklipenv.yaml` in `src/StraKLIP`.\n\nMove to the directory where you want to work, and create the following yaml files:\n1. `data.yaml` - This is the dataset configuration file.\n2. `pipe.yaml` - This is the pipeline global configuration file.\n\nYou'll need to redefine both to your actual needs, in particular the data.yaml\nExamples of both files are provided in the `src/StraKLIP/straklip/template` directory.\n\nThe `data.yaml` file host three major sections:\n```\ntarget: this section host the information about the target that can be applied to all the soruces in the catalog as whole\nmvs_table: this section host the convection use by the provided imput catalog for each column\nunq_table: this section host the convection use by the provided imput catalog for each column\n```\n\nThe `pipe.yaml` file host 13 major sections:\n```\ninstrument: here we record information about the instument used to acquire the data (for example the pixelscale, the name of the PAM, the array dimension etc.)\nncpu: number of CPU to be utilized running the pipelinme\nredo: wheter overwrit output of existing steps\ndebug: wheter promt more verbose modes and plots\nflow: enable which step the pipeline will go thorugh\n    - buildhdf: build the dataframe where to store the output of the pipeline\n    - mktiles:  create small tiles, one for each source in the catalog (both for the multivisit and the average)\n    - mkphotometry: perform aperture photometry on each tiles\n    - fow2cells:  break the FOW dividing the source in groups of close spatially related targets in order to minimize distorsion when building the PSF library and performin PSF subtraction\n    - psfsubtraction: perform PSF subtraction on each tile, and create a residual tile.\n    - klipphotometry: perform photometry on each residual tile and check the presence of a candidate companion\n    - analysis: extract companions, and asses contrast curves (raw and calibrated through throuput) and mass sensitivity curves \npaths: path mandatory for the pipeline\n  pyklip: path to pyklip\n  pam: path to Pixel Area Map for the instument\n  data: path to the fits file. I in the data folder are genrally stored all the heavy files like the fits files\n  database: path to catalogs and supplementary material\n  out: path to the output directory for the pipeline\nbuildhdf: here we record all the specific option for this step of the pipeline. In particular, under default_mvs_table and default_unq_table, we record the default name the pipeline will look for twith the matched name provided by the input catalogs for that specifc column\nmktiles: here we record all the specific option for this step of the pipeline\nmkphotometry: here we record all the specific option for this step of the pipeline\nfow2cells: here we record all the specific option for this step of the pipeline\npsfsubtraction: here we record all the specific option for this step of the pipeline\nklipphotometry: here we record all the specific option for this step of the pipeline\nanalysis: here we record all the specific option for this step of the pipeline\n```\n\nBefore running the pipeline, you will need a series of HST `_flc` images, and a catalog recording the `x`, `y`\ncoordinates and a few additional information of each sources on these images. Having their photometry might help, \nbut it's not mandatory. The pipeline will perform it's own aperture photometry.\n\nThe mandatory columns for the `mvs_table` catalog are the following:\n1. unq_ids: ids for average catalog \n2. mvs_ids: ids for multivisit catalog \n3. vis: visit column name in catalog \n4. ext: extension column name in catalog that identify SCI in fits file (for HST if CCDCHIP = 1, EXT = 4, CCDCHIP = 2, EXT = 1)\n5. x: filter wise x column name in catalog \n6. y: filter wise y column name in catalog\n7. fitsroot:  filter wise fitsroot column name in catalog (it's the filename without the `_flc` extension)\n8. exptime: filter wise exposure time for each source, i.e. header['EXPTIME']\n9. pav3: filter wise the HST V3 position angle, i.e. header['PA_V3']\n10. rota: filter wise HST orientation, i.e. header['ORIENTAT']\n\nYou can use the section `mvs_table` in the `data.yaml` to tell the pipeline how to match your columns name with the \npipeline default (stored in the `pipe.yaml`).\n\nAn `average` catalog recording the `ra`, `dec` and `type` of each `unique` source is also need. \nHaving their photometry might help, but it's not mandatory. The pipeline will evaluate this as well.\n\nThe mandatory columns for the `unq_table` catalog are the following:\n1. unq_ids: ids for average catalog \n2. ra: ra column name in catalog \n3. dec: dec column name in catalog \n4. type: filter wise type column name in catalog (see below)\n5. mag: filter wise mag column name in catalog\n6. emag: filter wise error mag column name in catalog\n\n```\ntype    Explanation\n0       a target that must be rejected by the pipeline (bad detection/photometry).\n1       a good target for the pipeline\n2       unresolved double\n3       known double\nn       user defined flag\n```\n\nNOTE: the pipeline will select only type 1 sources to build the base of it's PSF subtraction library. Source of type\n1, 2 or n (with n \u003e 3) will be processed by the pipeline instead.\n\nAn example of out to build these catalog is presented in the `join_catalogues.ipynb` notebook \nin `/Users/gstrampelli/PycharmProjects/Giovanni/src/StraKLIP/straklip/template`.\n\n## Running the Pipeline\n\nTo run the pipeline, run the `skpipe.py` script in `src/StraKLIP/script`. use the `-p` option to point to the\n`pipe.yaml` and `-d` to point to the `data.yaml` if not running the pipeline from the directory where they are stored.\n\nThe `flow` section of the `pipe.yaml` lists all the steps that will be executed when running the pipeline. \nHere you may comment out or delete all steps you do not wish to run. To fully function, the pipeline should run through \neach of the following at least once.\n\n```\nflow: \n########## first part of the pipeline ##########\n- buildhdf\n- mktiles\n- mkphotometry\n- fow2cells\n- psfsubtraction\n- klipphotometry\n- analysis\n```\n\n  \nTo generate all necessary directories as specified in the `paths` section of the `pipe.yaml`, run the pipeline with \nthe `--make-dir` option enable.\n\nNOTE: The default values for these `paths` will need to be changed in the `pipe.yaml` to point to the appropriate \nlocation for your computer. \n\n## Attribution\nMaintenance and current development of ``StraKLIP`` is led by Giovanni M. Strampelli (STScI).\nA special thanks to Dr. Massimo Robberto (STScI), Dr. Laurant Pueyo (STScI), Dr. Jonathan Aguilar (STScI) and Professor\nAntonio Aparicio (ULL) for their guidance during the development of the pipeline.\n\n**Citing StraKLIP:**\nIf StraKLIP is useful for your research,\nplease cite\n`Strampelli, G. M. et al. 2022, aj, 164, 147`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrampelligiovanni%2Fstraklip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrampelligiovanni%2Fstraklip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrampelligiovanni%2Fstraklip/lists"}