{"id":19315909,"url":"https://github.com/liweitianux/chandra-acis-analysis","last_synced_at":"2025-04-19T23:53:58.701Z","repository":{"id":74978272,"uuid":"59841134","full_name":"liweitianux/chandra-acis-analysis","owner":"liweitianux","description":"Chandra ACIS analysis tools and documents","archived":false,"fork":false,"pushed_at":"2018-10-22T14:57:38.000Z","size":500,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T23:53:54.828Z","etag":null,"topics":["acis","chandra","data-analysis"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liweitianux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-05-27T14:38:34.000Z","updated_at":"2024-02-27T04:12:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4215650-f55b-473c-a711-b5ddf713ae36","html_url":"https://github.com/liweitianux/chandra-acis-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweitianux%2Fchandra-acis-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweitianux%2Fchandra-acis-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweitianux%2Fchandra-acis-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweitianux%2Fchandra-acis-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liweitianux","download_url":"https://codeload.github.com/liweitianux/chandra-acis-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830852,"owners_count":21331357,"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","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":["acis","chandra","data-analysis"],"created_at":"2024-11-10T01:08:55.393Z","updated_at":"2025-04-19T23:53:58.684Z","avatar_url":"https://github.com/liweitianux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Chandra ACIS Data Analysis Tools\n================================\n\nWeitian LI, Junhu GU, and Zhenghao ZHU\n\n\nIntroduction\n------------\nThis repository currently contains the following tools:\n+ Chandra ACIS data reduction\n+ Point source and flares removal\n+ Blanksky reprojection\n+ Background spectrum correction\n+ Source spectra extraction and deprojection analysis (temperature profile)\n+ Surface brightness profile extraction\n+ Gravitational mass profile calculation (NFW profile extrapolation)\n+ Luminosity and flux calculation\n\nThese tools are developed to help and automate our batch analysis of the\nbig galaxy groups and clusters sample observed by Chandra ACIS.\nTherefore, there are many assumptions and hacks in these tools, and many\ncleanups are needed.\nIn addition, documents are badly needed!\n\n\nTODO\n----\n+ Rewrite more shell scripts in Python, use YAML configuration files, and\n  store results into `results.yaml` (get rid of `INFO.json`).  e.g.,\n  - `bin/fit_mass.sh`\n  - `bin/fit_sbp.sh`\n  - `bin/calc_lxfx.sh`\n  - `bin/calc_lxfx_wrapper.sh`\n  - `bin/get_lxfx_data.sh`\n  - `bin/fg_2500_500.py`\n  - `scripts/chandra_genspcreg.sh`\n  - `scripts/ciao_bkg_spectra.sh`\n  - `scripts/ciao_deproj_spectra.sh`\n  - `scripts/ciao_r500avgt.sh`\n  - more scripts in the `scripts` directory (also cleanups)\n+ Some Python programs need rewrite, e.g.,\n  - `bin/analyze_lxfx.py`\n  - `bin/analyze_mass_profile.py`\n+ Update the current docs and write more!\n\n\nRequirements\n------------\n+ Python (\u003e=3.5)\n+ CIAO (tested with v4.6, v4.9)\n+ HEASoft (tested with v6.16, v6.19)\n\n\nInstallation\n------------\n1. Clone this repository with ``opt_utilities``:\n\n   ```sh\n   $ git clone --recursive https://github.com/liweitianux/chandra-acis-analysis.git\n   ```\n\n   or in this way:\n\n   ```sh\n   $ git clone https://github.com/liweitianux/chandra-acis-analysis.git\n   $ cd chandra-acis-analysis\n   $ git submodule update --init --recursive\n   ```\n\n2. Install the following Python packages:\n\n   ```sh\n   $ sudo apt install python3-numpy python3-scipy python3-astropy python3-ruamel.yaml\n   ```\n\n   or\n\n   ```sh\n   $ pip3 install --user -r requirements.txt\n   ```\n\n3. Build tools in ``src`` directory:\n\n   ```sh\n   $ cd src\n   $ make clean\n   $ make [OPENMP=yes]\n   $ make install\n   ```\n\n\nSettings\n--------\nAdd the following settings to your shell's initialization file\n(e.g., ``~/.bashrc`` or ``~/.zshrc``).\n\n```sh\n# Environment variables:\nexport CHANDRA_ACIS_BIN=\"\u003cpath\u003e/chandra-acis-analysis/bin\"\n\n# Handy aliases:\nalias fitmass=\"${CHANDRA_ACIS_BIN}/fit_mass.sh\"\nalias fitnfw=\"${CHANDRA_ACIS_BIN}/fit_nfw_mass mass_int.dat\"\nalias fitsbp=\"${CHANDRA_ACIS_BIN}/fit_sbp.sh\"\nalias fittp=\"${CHANDRA_ACIS_BIN}/fit_wang2012_model\"\nalias calclxfx=\"${CHANDRA_ACIS_BIN}/calc_lxfx_wrapper.sh\"\nalias getlxfx=\"${CHANDRA_ACIS_BIN}/get_lxfx_data.sh\"\n```\n\nHEASoft Setup\n-------------\nTo avoid the conflicts between HEASoft and system libraries,\na [wrapper script](scripts/heasoft.sh) is provided.\n\n```sh\n$ mkdir ~/.heasoft\n$ cp scripts/heasoft.sh ~/.heasoft\n\n# Assume that your HEASoft is installed at '~/local/heasoft/heasoft-x.xx/'\n$ cd ~/local/heasoft\n$ ln -s heasoft-x.xx default\n$ cd default\n$ ln -s x86_64-unknown-linux-gnu-libc* PORTAL\n```\n\nThen add the following `heainit()` shell function:\n```sh\nheainit() {\n    local ld_lib_bak i tool\n    local wrapper=\"${HOME}/.heasoft/heasoft.sh\"\n    local wrapper_dir=$(dirname ${wrapper})\n    local wrapper_name=$(basename ${wrapper})\n    if [ -z \"${HEADAS}\" ]; then\n        ld_lib_bak=${LD_LIBRARY_PATH}\n        export HEADAS=\"${HOME}/local/heasoft/default/PORTAL\"\n        source ${HEADAS}/headas-init.sh\n        export LD_LIBRARY_PATH=${ld_lib_bak}\n        export PATH=\"${wrapper_dir}:${PATH}\"\n\n        if [ ! -f \"${wrapper}\" ]; then\n            echo \"ERROR: wrapper '${wrapper}' not found!\"\n            return\n        fi\n        chmod u=rwx ${wrapper}\n\n        echo \"Initializing HEASoft from ${HEADAS} ...\"\n        for i in ${HEADAS}/bin/*; do\n            tool=$(basename $i)\n            ln -sf ${wrapper_name} ${wrapper_dir}/${tool}\n        done\n\n        echo \"HEASoft initialized.\"\n    else\n        echo \"HEASoft already initialized from: ${HEADAS}\"\n    fi\n}\n```\n\n\nUsage\n-----\nSee the documentations located in the ``doc`` directory,\nespecially the [``HOWTO_chandra_acis_analysis.txt``](doc/HOWTO_chandra_acis_analysis.txt)\n\nNOTE: complete and detailed documentations are badly needed!\n\n\nUseful Links\n------------\n* [CIAO](http://cxc.cfa.harvard.edu/ciao/)\n* [Chandra CALDB](http://cxc.cfa.harvard.edu/ciao/download/caldb.html)\n* [Chandra Data Archive](http://cda.harvard.edu/chaser/)\n* [NED search by name](http://ned.ipac.caltech.edu/forms/byname.html)\n* [NED search near position](https://ned.ipac.caltech.edu/forms/nearposn.html)\n* [SIMBAD](http://simbad.u-strasbg.fr/simbad/)\n* [HEASoft](https://heasarc.gsfc.nasa.gov/lheasoft/)\n* [XSPEC](https://heasarc.gsfc.nasa.gov/lheasoft/xanadu/xspec/index.html)\n* [QDP/PLT User's Guide](https://heasarc.gsfc.nasa.gov/ftools/others/qdp/qdp.html)\n* [FTOOLS](https://heasarc.gsfc.nasa.gov/ftools/)\n* [HEASARC nH tool](https://heasarc.gsfc.nasa.gov/cgi-bin/Tools/w3nh/w3nh.pl)\n\n\nLicense\n-------\nUnless otherwise declared:\n\n* Codes developed by us are distributed under the\n  [MIT License](https://opensource.org/licenses/MIT);\n* Documentations and products generated by us are distributed under the\n  [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/us/deed.en_US).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliweitianux%2Fchandra-acis-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliweitianux%2Fchandra-acis-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliweitianux%2Fchandra-acis-analysis/lists"}