Skip to content

Conversation

@djhoese
Copy link
Member

@djhoese djhoese commented Mar 23, 2022

Creating a pull request from @adybbroe's old branch so we can close #48 when it is merged.

CC @PythonCreator27 @conkline

NOTE: This branch is very very very old and will take a lot of work to be brought up to modern standards of Python, Cython, GitHub Actions, and just generally how we maintain pytroll packages now. I DO NOT plan on working on this myself. I'm just creating the pull request to track discussion. I'm hoping @adybbroe or someone more interested can find the time and inspiration to continue/finish this work.

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes flake8 pyorbital
  • Fully documented

adybbroe and others added 22 commits May 15, 2012 10:37
Conflicts:
	doc/source/conf.py
	pyorbital/tests/test_aiaa.py
	setup.py
	tests/test_astronomy.py
	tests/test_orbital.py

Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
Conflicts:
	doc/source/index.rst
	pyorbital/tests/test_aiaa.py
	pyorbital/tests/test_orbital.py
	setup.py

Signed-off-by: Adam.Dybbroe <[email protected]>
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage']
#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', "sphinxtogithub"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '
E501 line too long (99 > 79 characters)

"""Calculations of the phase of the moon
"""

from numpy import deg2rad, sin, cos, tan, arctan, fabs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'numpy.fabs' imported but unused

dobj = np.array(dobj, 'datetime64[us]')

day = (
dobj - dobj.astype('datetime64[M]')).astype('f') / (24. * 3600. * 1000000) + 1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (88 > 79 characters)

day = (
dobj - dobj.astype('datetime64[M]')).astype('f') / (24. * 3600. * 1000000) + 1.0
month = (
dobj.astype('datetime64[M]') - dobj.astype('datetime64[Y]')).astype('f') + 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (84 > 79 characters)


cond1 = np.greater(year, 1582)
cond2 = np.logical_and(np.equal(year, 1582), np.greater(month, 10))
cond3 = np.logical_and(np.logical_and(np.equal(year, 1582), np.equal(month, 10)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (85 > 79 characters)

DTOBJ_LIST = [datetime(2016, 3, 1) + timedelta(seconds=10000 * i)
for i in range(20)]
JDAYS_RESULT = np.array([2457448.5, 2457448.61574078, 2457448.73148143,
2457448.84722221, 2457448.96296299, 2457449.07870364,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

for i in range(20)]
JDAYS_RESULT = np.array([2457448.5, 2457448.61574078, 2457448.73148143,
2457448.84722221, 2457448.96296299, 2457449.07870364,
2457449.19444442, 2457449.31018519, 2457449.42592597,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

JDAYS_RESULT = np.array([2457448.5, 2457448.61574078, 2457448.73148143,
2457448.84722221, 2457448.96296299, 2457449.07870364,
2457449.19444442, 2457449.31018519, 2457449.42592597,
2457449.54166651, 2457449.65740728, 2457449.77314806,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

2457448.84722221, 2457448.96296299, 2457449.07870364,
2457449.19444442, 2457449.31018519, 2457449.42592597,
2457449.54166651, 2457449.65740728, 2457449.77314806,
2457449.88888884, 2457450.00462961, 2457450.12037039,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

2457449.19444442, 2457449.31018519, 2457449.42592597,
2457449.54166651, 2457449.65740728, 2457449.77314806,
2457449.88888884, 2457450.00462961, 2457450.12037039,
2457450.23611116, 2457450.35185194, 2457450.46759272,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does pyorbital no longer calculate moon phase?

4 participants