Skip to content

Commit 5d88cdf

Browse files
committed
Adding constant_kwargs dict
1 parent a2a6a3a commit 5d88cdf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

astroplan/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,12 +1811,13 @@ class NonFixedTarget(Target):
18111811
18121812
Currently only some celestial objects are supported in this class.
18131813
"""
1814-
def __init__(self, coord_function=None, name=None):
1814+
def __init__(self, coord_function=None, name=None, constant_kwargs=None):
18151815
"""
18161816
TODO: Docstring.
18171817
"""
18181818
self.name = name.lower() if name is not None else name
18191819
self.coord_function = coord_function
1820+
self.constant_kwargs = constant_kwargs
18201821

18211822
@classmethod
18221823
def from_function(cls, coord_function, name=None):
@@ -1839,6 +1840,9 @@ def at(self, *args, **kwargs):
18391840
-------
18401841
A `~astropy.coordinates.SkyCoord` object as specified by the parameters.
18411842
"""
1843+
if self.constant_kwargs is not None:
1844+
for key in self.constant_kwargs:
1845+
kwargs[key] = self.constant_kwargs[key]
18421846
return self.coord_function(*args, **kwargs)
18431847

18441848
class Constraint(object):

0 commit comments

Comments
 (0)