Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation #18

Merged
merged 2 commits into from
Oct 17, 2019
Merged
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
13 changes: 10 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ source (like MacPorts or Homebrew), you may have to create a symlink called
If you are a ``conda`` user, you may wish to manually install the following
dependencies with ``conda`` so they are not installed with ``pip``::

$ conda install numpy numba cffi gitpython h5py scipy
$ conda install numpy numba cffi h5py scipy astropy

If you are happy to use the `conda-forge` channel, you can additionally do::

$ conda install -c conda-forge pyuvdata healpy

Then, installation should be as simple as ``pip install .`` from the top-level
directory, or ``pip install git+git://github.com/UPennEoR/RIMEz``. If you
installed ``FFTW`` to a non-default location, then you can point to its location
directory, or ``pip install git+git://github.com/UPennEoR/RIMEz``. Note that the
above manual installation of dependencies via `conda` is entirely optional -- simply
doing ``pip install .`` should work regardless.

If you installed ``FFTW`` to a non-default location, then you can point to its location
using the environment variable ``FFTW_PATH``, which should be the path to the
``lib`` folder, e.g.::

Expand Down
4 changes: 0 additions & 4 deletions RIMEz/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
import os
import warnings

import git
import h5py

import numpy as np

import ssht_numba as sshtn


from . import utils
from . import rime_funcs
from . import sky_models
Expand Down
5 changes: 4 additions & 1 deletion RIMEz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,15 @@ def JD2era_tot(JD):
theta = 2 * np.pi * (0.7790572732640 + 1.00273781191135448 * D_U)
return theta


def era2JD(era, nearby_JD):
def f(jd):
return era - JD2era_tot(jd)

JD_out = optimize.newton(f, nearby_JD, tol=1e-8)
return JD_out


def era_tot2JD(theta):
"""
Parameters
Expand All @@ -196,10 +198,11 @@ def era_tot2JD(theta):
"""
b = 1.00273781191135448
a = 0.7790572732640
D_U = (( theta / 2 / np.pi ) - a) / b
D_U = ((theta / 2 / np.pi) - a) / b
JD = D_U + 2451545.0
return JD


def get_rotations_realistic(era_axis, JD_INIT, array_location):
p1 = np.array([1.0, 0.0, 0.0])
p2 = np.array([0.0, 1.0, 0.0])
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"numpy",
"numba",
"cffi",
"gitpython",
"astropy",
"h5py",
"scipy",
"healpy",
Expand Down Expand Up @@ -52,7 +52,6 @@ def run(self):

setup(
name="RIMEz",
version="0.1.0",
plaplant marked this conversation as resolved.
Show resolved Hide resolved
description="Methods and input models for computing visibilities.",
url="https://github.com/UPennEOR/RIMEz",
author="Zachary Martinot",
Expand Down