Skip to content

Commit

Permalink
More *,
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Nov 2, 2023
1 parent e65d89d commit 6db1f0e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion aiapy/calibrate/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def fix_observer_location(smap):
return smap._new_instance(smap.data, new_meta, plot_settings=smap.plot_settings, mask=smap.mask)


def update_pointing(smap, pointing_table=None):
def update_pointing(smap, *, pointing_table=None):
"""
Update pointing information in the `smap` header.
Expand Down
5 changes: 3 additions & 2 deletions aiapy/calibrate/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@add_common_docstring(rotation_function_names=_rotation_function_names)
def register(smap, missing=None, order=3, method="scipy"):
def register(smap, *, missing=None, order=3, method="scipy"):
"""
Processes a full-disk level 1 `~sunpy.map.sources.sdo.AIAMap` into a level
1.5 `~sunpy.map.sources.sdo.AIAMap`.
Expand Down Expand Up @@ -110,7 +110,7 @@ def register(smap, missing=None, order=3, method="scipy"):
return newmap


def correct_degradation(smap, correction_table=None, calibration_version=None):
def correct_degradation(smap, *, correction_table=None, calibration_version=None):
"""
Apply time-dependent degradation correction to an AIA map.
Expand Down Expand Up @@ -158,6 +158,7 @@ def correct_degradation(smap, correction_table=None, calibration_version=None):
def degradation(
channel: u.angstrom,
obstime,
*,
correction_table=None,
calibration_version=None,
) -> u.dimensionless_unscaled:
Expand Down
2 changes: 1 addition & 1 deletion aiapy/calibrate/spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__all__ = ["respike", "fetch_spikes"]


def respike(smap, spikes=None):
def respike(smap, *, spikes=None):
"""
Re-insert "spikes" or "hot pixels" into level 1 AIA images.
Expand Down
2 changes: 1 addition & 1 deletion aiapy/calibrate/tests/test_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_register_level_15(lvl_15_map):
[
pytest.param(None, None, marks=pytest.mark.remote_data),
(
get_correction_table(get_test_filepath("aia_V8_20171210_050627_response_table.txt")),
get_correction_table(correction_table=get_test_filepath("aia_V8_20171210_050627_response_table.txt")),
8,
),
],
Expand Down
4 changes: 2 additions & 2 deletions aiapy/calibrate/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}


def get_correction_table(correction_table=None):
def get_correction_table(*, correction_table=None):
"""
Return table of degradation correction factors.
Expand Down Expand Up @@ -110,7 +110,7 @@ def get_correction_table(correction_table=None):

@u.quantity_input
@validate_channel("channel")
def _select_epoch_from_correction_table(channel: u.angstrom, obstime, table, version=None):
def _select_epoch_from_correction_table(channel: u.angstrom, obstime, table, *, version=None):
"""
Return correction table with only the first epoch and the epoch in which
`obstime` falls and for only one given calibration version.
Expand Down
2 changes: 1 addition & 1 deletion aiapy/response/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Channel:

@u.quantity_input
@validate_channel("channel")
def __init__(self, channel: u.angstrom, instrument_file=None):
def __init__(self, channel: u.angstrom, *, instrument_file=None):
self._channel = channel
self._instrument_data = self._get_instrument_data(instrument_file)

Expand Down
2 changes: 1 addition & 1 deletion aiapy/response/tests/test_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_effective_area(channel):
1.0140386988603103 * u.dimensionless_unscaled,
),
(
get_correction_table(get_test_filepath("aia_V8_20171210_050627_response_table.txt")),
get_correction_table(correction_table=get_test_filepath("aia_V8_20171210_050627_response_table.txt")),
8,
1.0140386988603103 * u.dimensionless_unscaled,
),
Expand Down
2 changes: 1 addition & 1 deletion aiapy/util/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]


def validate_channel(argument, valid_channels="all"):
def validate_channel(argument, *, valid_channels="all"):
"""
Parameters
----------
Expand Down

0 comments on commit 6db1f0e

Please sign in to comment.