Skip to content

Commit

Permalink
Merge pull request #159 from revoltek/master
Browse files Browse the repository at this point in the history
Rebase branch
  • Loading branch information
adrabent authored Sep 3, 2024
2 parents 110dab6 + d5d1a47 commit 18bb1ef
Show file tree
Hide file tree
Showing 64 changed files with 5,325 additions and 3,789 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
- name: Install
run: pip install .
- name: Test
# We cannot yet use `pytest`; requires different test file names
run: python tools/losoto_test.py
47 changes: 0 additions & 47 deletions Vagrantfile

This file was deleted.

6 changes: 3 additions & 3 deletions bin/H5parm2parmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,13 @@ def makeTECparmdb(H, solset, TECsolTab, timewidths, freq, freqwidth):
# check whether this is clock or tec; if so, reshape properly to account for all freqs in the parmdb
# anyway these tables are freq-indep
if solType == "Clock":# or solType == "TEC" or solType == "RotationMeasure":
# find freq-dimensionality
# find freq-dimensionality
nfreq = freqs.shape[0]
#print val.shape
# reshape such that all freq arrays are filled properly
val = np.tile( val, np.append([nfreq], np.ones(len(val.shape),dtype=np.int) ) )
val = np.tile( val, np.append([nfreq], np.ones(len(val.shape),dtype=int) ) )
#print val.shape
weights = np.tile( weights, np.append([nfreq], np.ones(len(weights.shape),dtype=np.int) ) )
weights = np.tile( weights, np.append([nfreq], np.ones(len(weights.shape),dtype=int) ) )

flags = np.zeros(shape=weights.shape, dtype=bool)
flags[np.where(weights == 0)] = True
Expand Down
2 changes: 1 addition & 1 deletion bin/H5parm_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
logging.debug("Shape:"+str(allShape))
allVals = np.empty( shape=allShape )
allVals[:] = np.nan
allWeights = np.zeros( shape=allShape )#, dtype=np.float16 )
allWeights = np.zeros( shape=allShape )#, dtype=float )

# fill arrays
logging.info("Filling new table...")
Expand Down
Loading

0 comments on commit 18bb1ef

Please sign in to comment.