Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified py/picca/bin/__init__.py
100644 → 100755
Empty file.
758 changes: 462 additions & 296 deletions py/picca/bin/picca_Pk1D.py
100644 → 100755

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions py/picca/bin/picca_Pk1D_average_mean.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env python
"""Compute the averaged 1D power spectrum
"""
#!/usr/bin/env python3
"""Compute the averaged 1D power spectrum"""

import argparse
import ast
import glob
import sys

import sys, glob, argparse, ast
from picca.pk1d import postproc_pk1d
from picca.utils import userprint

Expand Down Expand Up @@ -69,3 +72,8 @@ def main(cmdargs=None):
args.output_path,
weighted_mean=False,
)


if __name__ == "__main__":
cmdargs = sys.argv[1:]
main(cmdargs)
27 changes: 18 additions & 9 deletions py/picca/bin/picca_Pk1D_cross_exposure.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
#!/usr/bin/env python
"""Compute the individual cross-exposure 1D power spectra
"""
#!/usr/bin/env python3
"""Compute the individual cross-exposure 1D power spectra"""

import argparse
import glob
import multiprocessing as mp
import os
import sys
from functools import partial

import os, argparse, glob
import fitsio
import numpy as np
from picca.pk1d.compute_pk1d import compute_pk_cross_exposure, Pk1D

from picca.pk1d.compute_pk1d import Pk1D, compute_pk_cross_exposure
from picca.utils import userprint
import multiprocessing as mp
from functools import partial


def treat_pk_file(out_dir, filename):
"""
Takes a single file containing the FFT of delta for
multiple exposures and computes the cross-exposure power spectrum. The function
returns nothing, but writes to disk a new fits file with all the information needed
to compute Pk_cross_exposure. This is done by looping over each targetid and chunkid,
to compute Pk_cross_exposure. This is done by looping over each targetid and chunkid,
and computing Pk_cross_exposure for each pair of exposures.

Arguments
---------
out_dir: string
Expand Down Expand Up @@ -196,3 +200,8 @@ def main(cmdargs=None):
else:
with mp.Pool(args.num_processors) as pool:
pool.map(func, files)


if __name__ == "__main__":
cmdargs = sys.argv[1:]
main(cmdargs)
Loading
Loading