ascl_id stringclasses 752
values | repo_url stringclasses 737
values | file_path stringlengths 4 194 | content large_stringlengths 1 1M | language stringclasses 29
values | license_type stringclasses 24
values | size int64 1 1M |
|---|---|---|---|---|---|---|
[ascl:2209.016] | https://github.com/exobssim/rapoc-public | tests/test_rayleigh.py | import unittest
import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
from rapoc.models import Rayleigh
from test_model import data_dict
from rapoc.models import Model
class RayleighTest(unittest.TestCase):
def test_raw_input(self):
model = Rayleigh('H', wavenumber_grid=data_dic... | Python | BSD-3-Clause | 3,297 |
[ascl:2209.016] | https://github.com/exobssim/rapoc-public | tests/test_planck.py | import unittest
import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
from input import exomol_file
from rapoc.models import Planck
class PlanckTest(unittest.TestCase):
model = Planck(input_data=exomol_file)
def test_extract_opacity(self):
k_ext, _ = self.model.extract_opacit... | Python | BSD-3-Clause | 3,240 |
[ascl:2209.016] | https://github.com/exobssim/rapoc-public | examples/quickstart.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"# RAPOC\n",
"## Rosseland and Planck Opacity Converter\n",
"\n",
"Welcome to the `RAPOC` (Rosseland And Planck Opacity Converter) quick-start guide. This notebook is an... | Jupyter Notebook | BSD-3-Clause | 156,981 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | readme.md | # Warning!
1) Do not use IDE to debugging the program, because RAPP uses the multiprocessing module.
2) The latest version of Anaconda is recommended, as the older version may not work (the February 2020 version of Anaconda can run RAPP directly, in Linux system).
3) Since the 1.26m telescope is equatorial, the angle p... | Markdown | null | 3,873 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | main_example.py | # -*- coding:utf-8 -*-
# Robust Automated Photometry Pipeline for Blurred Images
# https://ui.adsabs.harvard.edu/abs/2020PASP..132g5001H/abstract
from module.core_mp import RAPP
import pickle
from glob import glob
import os
import numpy as np
import multiprocessing as mp
def main1(path, band):
date = os.path.base... | Python | null | 1,367 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | readme_cn.md | # 提醒!
1) 请勿用IDE的调试运行程序,因为程序使用了multiprocessing模块
2) 建议用最新版本的Anaconda,因为旧版本的可能无法运行 (2020-2的版本可以在Linux系统直接运行)
3) 由于1.26m望远镜为赤道式的,程序中暂时没编写图像旋转的代码
********************************
# 简易测光教程:
>## 首先引入:
from module import core
>## 随后创建测光对象:
app = core.APpipeline(targ='xxx',
... | Markdown | null | 4,636 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | module/core_mp.py | # -*- coding:utf-8 -*-
# pylint:disable=maybe-no-member
# pylint:disable=invalid-unary-operand-type
# Robust Automated Photometry Pipeline for Blurred Images
# https://ui.adsabs.harvard.edu/abs/2020PASP..132g5001H/abstract
import csv
import multiprocessing as mp
import os
from glob import glob
import numpy as np
impo... | Python | null | 28,437 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/03_D.txt | 0.0000
0.0619
0.7940
0.9147
0.6950
0.9609
| Text | null | 42 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/05_D.txt | 0.0000
0.9094
0.9609
0.7080
1.9619
0.0315
| Text | null | 42 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/01_D.txt | 0.0000
1.2206
0.6910
0.9147
0.1316
0.0315
| Text | null | 42 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/00_D.txt | 0.0000
0.9094
0.6950
0.2036
0.1197
0.1316
| Text | null | 42 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/04_D.txt | 0.0000
1.8540
0.6910
0.7940
0.1197
1.9619
| Text | null | 42 |
[ascl:2005.016] | https://github.com/astronomical-data-processing/RAPP | output/data_example/g/02_D.txt | 0.0000
1.8540
1.2206
0.0619
0.2036
0.7080
| Text | null | 42 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | README.md | # Rapster
Rapid population synthesis code for compact binary coalescences in dense stellar clusters.
$\tt Rapster$ stands for $\rm RAPid\ cluSTER$ evolution.
(Thanks to Mark Cheung for coming up with the short-hand version!)
Author: Konstantinos Kritos <kkritos1@jhu.edu>
Version: March 18, 2026.
(Thanks to Tousif Is... | Markdown | Unknown | 23,518 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | pyproject.toml | [build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "rapster"
version = "2.7.0"
description = "Rapid population synthesis package for compact object coalescences in dense star clusters."
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"numpy==... | TOML | Unknown | 483 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Data/.marginally_bound.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 3,057 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/binary_evolution.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 28,345 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/functions.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 10,394 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/tidal_disruptions.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 3,910 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/stellar_evolution.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 16,866 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/run_cluster.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 42,084 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/remnant.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 6,859 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/triples.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 7,302 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/three_body_binary.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 2,679 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/exchanges.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 4,443 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/two_body_capture.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 7,423 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | rapster/constants.py | '''
Copyright (C) 2026 Konstantinos Kritos <kkritos1@jhu.edu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | Python | Unknown | 3,933 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Example/tutorial.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "0e17e728-0ca9-46f4-aef4-9f669f3ae328",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from rapster.constants import *\n",
"from ast... | Jupyter Notebook | Unknown | 356,632 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Example/Results_Test/hardening.txt | 5.4999999999999964 4.294225646945429 0.0 0.003636859093151661 437405609.0 0.0003131499667229846 0.15331197211634495 40.50185469801332 40.506138339098484 0.99989424711264 4.0 0.0
5.4999999999999964 4.294225646945429 0.003636859093151661 0.004675383437170287 437405609.0 0.00024358411522067808 0.890106636847318 40.5061383... | Text | Unknown | 769,243 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Example/Results_Test/mergers.txt | 1234567890.0 437405609.0 3.0 2.581770635147948e-06 0.9943311759766891 40.50959741717835 40.506138339098484 0.0 0.0 1.0 1.0 1.8243786368877346 2.3234465602603103 5.212034358739405 5.4999999999999964 2.993102161492994 16.9711978405425 2.9788088814161204 77.10510620346771 0.6864600902869958 2.0 0.024577099682850986 -0.0 0... | Text | Unknown | 10,101 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Example/Results_Test/tdes.txt | 1234567890.0 3.600000000000002 2.9954817564491063 1.0 0.6093423767456355 2.25e-08 18.675979243357922 0.0 1.0 7.041359503858803e-08 3.821329762684552e-08 1.842646393048299 1.5654801159089904 3.577734859791527e-12 0.30467118837281776 -0.0586528828164007 1.960507736145256e-11 2.7563627255608518e-05 3.8551537570104696e+16 ... | Text | Unknown | 12,259 |
[ascl:2308.008] | https://github.com/Kkritos/Rapster | Example/Results_Test/evolution.txt | 1234567890.0 0.0 3.0 0.1 0.5859340259680028 585934.0259680029 1.0 8000.0 220.0 274.5988533744479 1e+100 530000.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1e+100 1e+100 0.0 0.0 0.0 0.0 0.0 0.0 31.784132507513515 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1e+100 0.0 0.0 0.0 1e+100 1e+100 0.0 0.0 0.0 0.0 0.0 1e+100 0.0 0.0 63... | Text | Unknown | 313,423 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | LICENSE.txt | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software... | Text | Unknown | 34,600 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | grmhd.c | /*
* grmhd.c
*
* Please note that most of the code in this file was adapted
* from GRMONTY (Dolence et al., 2009).
*
* GRMONTY is released under the GNU GENERAL PUBLIC LICENSE.
* Modifications were made in August 2016 by T. Bronzwaer and
* J. Davelaar.
*/
#include "raptor_harm_model.h"
#include "constants.h"
... | C | Unknown | 2,695 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | raptor_harm_model.h | /*
* raptor_harm_model.h
*
* Please note that most of the code in this file was adapted
* from GRMONTY (Dolence et al., 2009).
*
* GRMONTY is released under the GNU GENERAL PUBLIC LICENSE.
* Modifications were made in August 2016 by T. Bronzwaer and
* J. Davelaar.
*
* A copy of the GRMONTY license is included... | C/C++ Header | Unknown | 3,284 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | metric.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Moscibrodzka
*
*/
#include "parameters.h"
#include "raptor_harm_model.h"
#include "functions.h"
#include "constants.h"
#include "gsl/gsl_linalg.h"
// Returns the covarian... | C | Unknown | 32,733 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | j_nu.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
*/
#include "functions.h"
#include "constants.h"
#include "parameters.h"
#include <stdio.h>
#include "gsl/gsl_sf_hyperg.h"
#include <gsl/gsl_sf_bessel.h>
... | C | Unknown | 7,443 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | newtonraphson.c | #include "functions.h"
#include "constants.h"
#include "parameters.h"
#include "raptor_harm_model.h"
// TRANSFORMATION FUNCTIONS
///////////////////////////
// Returns the value of f(Xg2) given some value for Xr2. For the correct Xg2,
// we have f(Xg2) = 0.
real f_Xg2(real Xg2, real Xr2,real lr,int init){
ret... | C | Unknown | 3,830 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | rcarry.c | /*
* This program is based on a simple RNG devised by professor Ronald Kleiss at Radboud University.
* It was presented in the class notes of his course "Monte Carlo Techniques".
* Prof. Kleiss has authorized redistribution of this code as long as he is credit as the algorithm's originator.
* Implementation author:... | C | Unknown | 1,868 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | functions.h | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
* A list of all RAPTOR functions.
*/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include <stdio.h>
#include "parameters.h"
// RAPTOR_HARM_MODEL.C
/////////... | C/C++ Header | Unknown | 8,283 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | core.c | #include "parameters.h"
#include "functions.h"
void read_model( char *argv[]){
char inputfile[100];
char inputfile2[100];
// model to read
sscanf(argv[1], "%s", inputfile);
printf("Reading %s...",inputfile);
FILE *input;
input = fopen(inputfile, "r");
if... | C | Unknown | 8,702 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | README.md | # RAPTOR
This is the public version of the RAPTOR code for radiative transfer in arbitrary spacetimes.
<br />
## UPDATE: POLARIZED RAPTOR
The polarized version of RAPTOR may now be found in a new branch within this repository:
https://github.com/tbronzwaer/raptor/blob/polarization/README.md
This version of RAPTO... | Markdown | Unknown | 2,481 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | GRmath.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
* Indices 0,1,2,3 correspond to t,r,theta,phi
*
* Sign convention: (-,+,+,+)
*
*/
#include "functions.h"
#include "parameters.h"
// Lowers the index of... | C | Unknown | 8,289 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | run.sh |
#!/bin/bash
echo ' '
./RAPTOR model.in dump040 2e19 60 3 3 1
echo ''
| Shell | Unknown | 71 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | constants.h | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
* A list of physical constants used by RAPTOR.
* CGS units are used.
*/
#include "parameters.h"
#ifndef CONSTANTS_H
#define CONSTANTS_H
// PHYSICAL CONS... | C/C++ Header | Unknown | 1,256 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | plotter.py | #! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
from scipy.interpolate import griddata
from scipy.interpolate import interp2d
filename='output/img_data_1_1.000000e+11_60.00.dat'
outputfile='output/img.png'
print("RAPTOR imaging visualization script \n")
print("Read... | Python | Unknown | 1,950 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | main.c | /***********************************************************************************
Copyright: 2014-2020 Black Hole Cam (ERC Synergy Grant 610058)
Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Moscibrodzka,
Ziri Younsi, Heino Falcke, Michael Kramer, and Luciano Rezzolla
RAP... | C | Unknown | 5,774 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | integrator.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
*/
#include "functions.h"
#include "parameters.h"
#include "constants.h"
#include "raptor_harm_model.h"
// Updates the vector y (containing position/velocit... | C | Unknown | 11,484 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | raptor_harm_model.c | /*
* raptor_harm_model.c
*
* Please note that most of the code in this file was adapted
* from GRMONTY (Dolence et al., 2009).
*
* GRMONTY is released under the GNU GENERAL PUBLIC LICENSE.
* Modifications were made in August 2016 by T. Bronzwaer and
* J. Davelaar.
*
* A copy of the GRMONTY license is included... | C | Unknown | 11,671 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | radiative_transfer.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Mościbrodzka
*
*/
//#include <math.h>
#include "functions.h"
#include "constants.h"
#include "parameters.h"
#include <stdio.h>
#include "gsl/gsl_sf_hyperg.h"
#include "rap... | C | Unknown | 4,929 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | utilities.c | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Moscibrodzka, Ziri Younsi
*/
#include "parameters.h"
#include "constants.h"
#include <stdio.h>
void print_time(int start){
clock_t diff = clock() - start;
... | C | Unknown | 4,363 |
[ascl:1803.015] | https://github.com/tbronzwaer/raptor | parameters.h | /*
* Radboud Polarized Integrator
* Copyright 2014-2020 Black Hole Cam (ERC Synergy Grant)
* Authors: Thomas Bronzwaer, Jordy Davelaar, Monika Moscibrodzka
*
* RAPTOR uses cgs units for light transport calculations.
* Entries marked [BL] are only applicable to Boyer-Lindquist coordinates.
*/
#ifndef PARAMETERS_... | C/C++ Header | Unknown | 5,301 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | README.md | # RascalC
**A Rapid Sampler For Large Cross-Covariance Matrices in C++**
C++ code to simulate correlation function covariance matrices from large surveys, using a grid and jackknife based approach. This can be used to find covariances of (a) the angularly binned anisotropic 2PCF, (b) the Legendre-binned anisotropic 2P... | Markdown | MIT | 2,418 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | .readthedocs.yaml | # Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool vers... | YAML | MIT | 1,090 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | requirements.txt | git+https://github.com/cosmodesi/pycorr | Text | MIT | 39 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | grid_covariance.cpp | // grid_covariance.cpp -- Oliver Philcox / Alexander Wiegand, started Oct 14, 2016 based on grid_multipoles.cpp of Daniel Eisenstein.
#include <sys/time.h>
#include <sys/resource.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <complex>
#include <algorithm>
... | C++ | MIT | 17,841 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | pyproject.toml | [build-system]
requires = ["hatchling", "hatch-build-scripts"]
build-backend = "hatchling.build"
[project]
name = "RascalC"
dynamic = ["version"]
description = 'A Fast Code for Galaxy Covariance Matrix Estimation'
readme = "README.md"
requires-python = ">=3.10"
# license = "MIT"
keywords = ['correlation functions', 's... | TOML | MIT | 1,698 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial-paircounts.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pair counting for Tutorial: Aperiodic Data and Jackknives\n",
"\n",
"This computes the pair counts and correlation functions for [the main tutorial notebook](tutorial.ipynb).\n",
"If you already have the pair counting res... | Jupyter Notebook | MIT | 14,664 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | promote_numeric.h | /*
Template stuff for type-promotion
needed by threevector and simplefuncs
Time-stamp: <promote_numeric.h on Saturday, 8 September, 2012 at 16:02:45 MST (philip)>
*/
#ifndef __PROMOTE_NUMERIC_H_INCLUDED__
#define __PROMOTE_NUMERIC_H_INCLUDED__
#include <limits>
template <bool, class T, class U>
struct Select... | C/C++ Header | MIT | 1,353 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial: Aperiodic Data and Jackknives\n",
"\n",
"We present a basic example of the use of the RascalC Python wrapper for a single field, computing the 2PCF in $(r,\\mu)$ bins, and calibrating the non-Gaussianity parameter (... | Jupyter Notebook | MIT | 69,607 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | .github/workflows/python-package-conda.yml | name: Python Package using Conda
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
st... | YAML | MIT | 1,377 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | .github/workflows/python-package.yml | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
pull_request:
branches: [ "master" ]
jobs:
build:
... | YAML | MIT | 1,522 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/integrals_3pcf.h | // Rewritten integrals.h code for legendre multipoles
#include "parameters.h"
#include "correlation_function.h"
#include "cell_utilities.h"
#include "legendre_utilities.h"
#include <algorithm>
#ifndef INTEGRALS_3PCF_H
#define INTEGRALS_3PCF_H
class Integrals{
public:
CorrelationFunction *cf;
private:
int... | C/C++ Header | MIT | 37,227 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/integrals_legendre_power.h | // Rewritten integrals.h code for legendre multipoles
#include "parameters.h"
#include "correlation_function.h"
#include "cell_utilities.h"
#include "legendre_utilities.h"
#ifndef INTEGRALS_LEGENDRE_POWER_H
#define INTEGRALS_LEGENDRE_POWER_H
class Integrals{
public:
CorrelationFunction *cf12, *cf13, *cf24;
privat... | C/C++ Header | MIT | 19,005 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/random_draws.h | // random draws class for grid_covariance.cpp (originally from Alex Wiegand, rewritten by Oliver Philcox)
#include "correlation_function.h"
#include "parameters.h"
#include <gsl/gsl_sf_dawson.h>
#ifndef RANDOM_DRAWS_H
#define RANDOM_DRAWS_H
class RandomDraws{
// Class that handles the selection of neighbouring box... | C/C++ Header | MIT | 13,769 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/integrals_power.h | // Rewritten integrals.h code for legendre multipoles
#include "parameters.h"
#include "correlation_function.h"
#include "cell_utilities.h"
#include "legendre_utilities.h"
#ifndef INTEGRALS_POWER_H
#define INTEGRALS_POWER_H
class Integrals{
public:
CorrelationFunction *cf12, *cf13, *cf24;
private:
int nbin, m... | C/C++ Header | MIT | 19,439 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/string_format.h | // safer replacement for snprintf with some reasonable upper limit on the string length (often was 1000)
// from https://stackoverflow.com/a/26221725/23322509
#ifndef STRING_FORMAT_H
#define STRING_FORMAT_H
#include <memory>
#include <string>
#include <stdexcept>
template<typename ... Args>
std::string string_format... | C/C++ Header | MIT | 1,096 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/compute_integral_3pcf.h | // This class computes the contributions to the threePCF autocovariance C_ab integral iterating over cells and particles.
#ifndef COMPUTE_INTEGRAL_3PCF_H
#define COMPUTE_INTEGRAL_3PCF_H
// Load class to hold integrals
#include "integrals_3pcf.h"
class compute_integral{
private:
uin... | C/C++ Header | MIT | 24,132 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/correlation_function.h | // correlation function class for grid_covariance.cpp file (originally from Alex Wiegand)
#ifndef CORRELATION_FUNCTION_H
#define CORRELATION_FUNCTION_H
class CorrelationFunction{
/* Reads and stores a 2d correlation function. Values in between the grid positions of the input
* are interpolated using gsl_inter... | C/C++ Header | MIT | 14,534 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/compute_integral.h | // This class computes the contributions to the C_ab integral iterating over cells and particles. It is a heavily modified version of code by Alex Wiegand.
#ifndef COMPUTE_INTEGRAL_H
#define COMPUTE_INTEGRAL_H
// Choose relevant class to hold integrals
#ifdef LEGENDRE
#include "integrals_legendre.h"
#eli... | C/C++ Header | MIT | 34,803 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/integrals.h | // Rewritten integrals.h code for grid_covariance.cpp (originally from Alex Wiegand) to parallelize and compute integrands to a given quad of particles
#ifndef INTEGRALS_H
#define INTEGRALS_H
#include "parameters.h"
#include "correlation_function.h"
#include "cell_utilities.h"
#include "jackknife_weights.h"
#ifdef LE... | C/C++ Header | MIT | 39,047 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/grid.h | //grid class for grid_covariance.cpp file (modified from Alex Wiegand)
#include "cell_utilities.h"
#ifndef GRID_H
#define GRID_H
class Grid {
public:
Float3 rect_boxsize; // 3D dimensions of the periodic volume
int nside, ncells; // Grid size (per linear and per volume)
Cell *c = nullptr; // The ... | C/C++ Header | MIT | 8,198 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/legendre_utilities.h | // legendre_utilities.h - This contains utility functions for computing matrices binned in Legendre moments
#ifndef LEGENDRE_UTILITIES_H
#define LEGENDRE_UTILITIES_H
#ifdef THREE_PCF
const int max_no_multipoles = 11; // for array allocation on stack - no variable length arrays in C++ standards. needs to be consistent... | C/C++ Header | MIT | 10,863 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/driver.h | // driver.h - this contains various c++ functions to create particles in random positions / read them in from file. Based on code by Alex Wiegand.
#include "cell_utilities.h"
#if (!defined LEGENDRE && !defined THREE_PCF && !defined POWER)
#include "jackknife_weights.h"
#endif
#ifndef DRIVER_H
#define DRIVER_H
// ... | C/C++ Header | MIT | 8,717 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/legendre_mix_utilities.h | // legendre_mix_utilities.h - This contains utility functions for computing matrices binned in Legendre moments projected from s/r and mu binned correlation function
#ifndef LEGENDRE_MIX_UTILITIES_H
#define LEGENDRE_MIX_UTILITIES_H
class MuBinLegendreFactors{
// this class stores the (2*ell+1) times integral of L... | C/C++ Header | MIT | 3,542 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/parameters.h |
// parameter function file for grid_covariance.cpp (originally from Alex Wiegand)
#ifndef PARAMETERS_H
#define PARAMETERS_H
#include "string_format.h"
#ifdef LEGENDRE_MIX
#include "legendre_mix_utilities.h"
#endif
class Parameters{
public:
// Important variables to set! Here are the defaults:
//---------- E... | C/C++ Header | MIT | 39,538 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/integrals_legendre.h | // Rewritten integrals.h code for legendre multipoles
#include "parameters.h"
#include "correlation_function.h"
#include "cell_utilities.h"
#include "legendre_utilities.h"
#include <algorithm>
#ifndef INTEGRALS_LEGENDRE_H
#define INTEGRALS_LEGENDRE_H
class Integrals{
public:
CorrelationFunction *cf12, *cf13, *cf2... | C/C++ Header | MIT | 20,121 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/jackknife_weights.h | // jackknife_weights.h - this contains c++ functions to read-in jackknife weights and pair counts from files.
#ifndef JACKKNIFE_WEIGHTS_H
#define JACKKNIFE_WEIGHTS_H
// This class stores the RR count weights for a given jackknife
class JK_weights{
public:
Float* RR_pair_counts = nullptr; // houses the weighted pa... | C/C++ Header | MIT | 8,088 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/cell_utilities.h | // cell_utilities.h - This contains many cell-related functions including the cell and particle classes. Based on code by Alex Wiegand.
#ifndef CELL_UTILITIES_H
#define CELL_UTILITIES_H
// We need a vector floor3 function
Float3 floor3(float3 p) {
return Float3(floor(p.x), floor(p.y), floor(p.z));
}
// we need a... | C/C++ Header | MIT | 1,612 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | modules/rescale_correlation.h | // rescale_correlation script to rescale the input correlation function to correct for errors due to the interpolation function requiring the bin center value and the inputs giving the mean-bin positions only.
#ifndef RESCALE_CORRELATION_H
#define RESCALE_CORRELATION_H
#include <algorithm>
#include <inttypes.h>
clas... | C/C++ Header | MIT | 15,604 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial/tutorial-RascalC-only.sh | #!/bin/bash
#SBATCH --account=desi
#SBATCH --constraint=cpu
#SBATCH --qos=shared
#SBATCH --time=12:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=128 # 128 hyperthreads = 64 physical cores
#SBATCH --job-name=RascalC-performance-test-tutorial
# load cosmodesi environment
source /global/comm... | Shell | MIT | 417 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial/tutorial-pycorr-gpu.sh | #!/bin/bash
#SBATCH --account=desi_g
#SBATCH --constraint=gpu
#SBATCH --qos=regular
#SBATCH --time=3:00:00
#SBATCH --nodes=1
#SBATCH --gpus=4
#SBATCH --job-name=RascalC-tutorial-pycorr
# load cosmodesi environment
source /global/common/software/desi/users/adematti/cosmodesi_environment.sh main
python -u tutorial-pyco... | Shell | MIT | 329 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial/tutorial-pycorr-gpu.py | # Set the filenames
galaxies_filename = "mock_galaxy_DR12_CMASS_N_QPM_0001.rdzw"
randoms_filename = "mock_random_DR12_CMASS_N_50x1.rdzw"
# Read the original files: text with RA, DEC, Z (redshift) and weight columns.
import numpy as np
import numpy.typing as npt
from astropy.table import Table
galaxies = Table(np.load... | Python | MIT | 6,029 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | tutorial/tutorial-RascalC-only.py | # Set the filenames
galaxies_filename = "mock_galaxy_DR12_CMASS_N_QPM_0001.rdzw"
randoms_filename = "mock_random_DR12_CMASS_N_50x1.rdzw"
# Read the original files: text with RA, DEC, Z (redshift) and weight columns.
import numpy as np
import numpy.typing as npt
from astropy.table import Table
galaxies = Table(np.load... | Python | MIT | 6,199 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/convert_xi_jack_from_pycorr.py | "This reads a cosmodesi/pycorr .npy file and generates jackknife xi, weight, paircounts, and total paircounts text files for RascalC to use"
import numpy as np
import sys
## PARAMETERS
if len(sys.argv) not in (6, 7, 8, 9, 10, 11):
print("Usage: python convert_xi_jack_from_pycorr.py {INPUT_NPY_FILE} {OUTPUT_XI_JAC... | Python | MIT | 1,489 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/convert_to_xyz.py | """Convenience script to convert an input (Ra,Dec,w) FITS or txt file to comoving (x,y,z) coordinates saved as a .txt file for use with the main C++ code. (Oliver Philcox 2018 with modifications by Michael Rashkovetskyi 2022, using Daniel Eisenstein's 2015 WCDM Coordinate Converter).
Output file format has (x,y,z,w) co... | Python | MIT | 2,186 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/combine_covs.py | "This reads two sets of RascalC results and two cosmodesi/pycorr .npy files to combine two covs following NS/GCcomb procedure. Covariance of N and S 2PCF is neglected."
import sys
## PARAMETERS
if len(sys.argv) not in (9, 11):
print("Usage: python combine_covs.py {RASCALC_RESULTS1} {RASCALC_RESULTS2} {PYCORR_FILE... | Python | MIT | 1,075 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/combine_covs_legendre_multi_to_cat.py | "This reads two sets of RascalC results and two triplets of cosmodesi/pycorr .npy files to combine two full 2-tracer covs following NS/GCcomb procedure for 2 tracers in Legendre mode and convert them . Covariance of N(GC) and S(GC) 2PCF is neglected."
import sys
## PARAMETERS
if len(sys.argv) not in (13, 15, 17):
... | Python | MIT | 1,460 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/sample_cov_from_pycorr.py | "This reads cosmodesi/pycorr .npy file(s) and generates sample covariance of xi(s,mu) in text format"
import sys
## PARAMETERS
if len(sys.argv) < 8:
print("Usage: python sample_cov_from_pycorr.py {INPUT_NPY_FILE1} {INPUT_NPY_FILE2} [{INPUT_NPY_FILE3} ...] {OUTPUT_COV_FILE} {R_STEP} {N_MU} {R_MAX} {N_CORRELATIONS}... | Python | MIT | 1,006 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/sample_cov_multipoles_from_pycorr.py | "This reads cosmodesi/pycorr .npy file(s) and generates sample covariance of xi_l(s) in text format"
import sys
## PARAMETERS
if len(sys.argv) < 8:
print("Usage: python sample_cov_multipoles_from_pycorr.py {INPUT_NPY_FILE1} {INPUT_NPY_FILE2} [{INPUT_NPY_FILE3} ...] {OUTPUT_COV_FILE} {R_STEP} {MAX_L} {R_MAX} {N_CO... | Python | MIT | 1,052 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/write_binning_file_hybrid.py | ## Utility function to create the Corrfunc radial-binning file for a given number of radial bins in a certain range of comoving radii.
import sys
if len(sys.argv) < 7:
print("Please specify input parameters in the form {N_LOG_BINS} {N_LIN_BINS} {MIN_R} {CUTOFF_R} {MAX_R} {OUTPUT_FILE}.")
sys.exit(1)
from uti... | Python | MIT | 672 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/convert_cov_legendre_multi_to_cat.py | "This reads a .npy file of RascalC Legendre results (or txt covariance converted previously) and a triplet of cosmodesi/pycorr .npy files to produce a covariance for a catalog of these two tracers concatenated."
import sys
## PARAMETERS
if len(sys.argv) not in (9, 11):
print("Usage: python combine_cov_multi_to_ca... | Python | MIT | 1,067 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/post_process_default_mocks.py | ## Script to post-process the single-field integrals computed by the C++ code. This computes the shot-noise rescaling parameter, alpha, from a mock derived covariance matrix.
## We output the theoretical covariance matrices, (quadratic-bias corrected) precision matrices and the effective number of samples, N_eff.
impo... | Python | MIT | 908 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/post_process_legendre.py | ## Script to post-process the single-field Legendre binned integrals computed by the C++ code.
## We output the theoretical covariance matrices, (quadratic-bias corrected) precision matrices and the effective number of samples, N_eff.
import sys
# PARAMETERS
if len(sys.argv) not in (5, 6, 7, 8):
print("Usage: pyt... | Python | MIT | 868 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/write_binning_file_linear.py | ## Utility function to create the Corrfunc radial-binning file for a given number of radial bins in a certain range of comoving radii.
import sys
if len(sys.argv) < 5:
print("Please specify input parameters in the form {N_BINS} {MIN_R} {MAX_R} {OUTPUT_FILE}.")
sys.exit(1)
from utils import adjust_path
adjust... | Python | MIT | 560 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/convert_cov.py | "Simple convenience script that reads RascalC results and saves full cov to text file, in addition checking eigenvalues of bias matrix"
import sys
## PARAMETERS
if len(sys.argv) != 3:
print("Usage: python convert_cov.py {RASCALC_RESULTS_FILE} {OUTPUT_COV_FILE}.")
sys.exit(1)
from utils import adjust_path
adj... | Python | MIT | 488 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/normalize_weights.py | """Convenience script to normalize weights in an input (x,y,z,w) or (x,y,z,w,j) txt file and save the result in another .txt file for use with further scripts. (Michael Rashkovetskyi 2023).
Parameters:
INFILE = input ASCII file
OUTFILE = output ASCII file
"""
import sys
# Check number of paramet... | Python | MIT | 678 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/smoothen_xi.py | ### Script to smoothen a measured 2PCF in xi(r,mu) format.
### This computes all even multipoles xi_ell(r) up to a specified maximum ell, approximating the integral by a sum.
### Then r^2*xi_ell(r) are smoothened with Savitzky-Golay filter
### Finally, they are transformed back to xi(r,mu) format.
import sys
## PARAM... | Python | MIT | 780 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/convert_cov_legendre.py | "Slightly more complicated (than convert_cov.py) convenience script that reads RascalC Legendre mode results and saves full cov to text file, changing the indexing from [r, l] to [l, r], in addition checking eigenvalues of bias matrix"
import sys
## PARAMETERS
if len(sys.argv) != 4:
print("Usage: python convert_c... | Python | MIT | 656 |
[ascl:1909.008] | https://github.com/oliverphilcox/RascalC | scripts/create_jackknives_pycorr.py | """ This function will assign a jackknife region to each input particle, in a way compatible with pycorr used in DESI data processing. Data is saved as a 5 column text file."""
import sys
## PARAMETERS
if len(sys.argv) != 5:
print("Usage: python create_jackknives_pycorr.py {REF_RDZ_FILE} {INPUT_XYZW_FILE} {OUTPUT... | Python | MIT | 693 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.