diff --git a/eniric/broaden.py b/eniric/broaden.py
index 94d2900..04cd4e3 100644
--- a/eniric/broaden.py
+++ b/eniric/broaden.py
@@ -6,16 +6,16 @@ Used to convolve the spectra for
 
 Uses joblib.Memory to cache convolution results to skip repeated computation.
 """
-from typing import Optional, Union
 import os
+from typing import Optional, Union
 
-import numpy as np
 import multiprocess as mprocess
+import numpy as np
 from astropy.constants import c
 from joblib import Memory
+from multiprocess import pool
 from numpy.core.multiarray import ndarray
 from tqdm import tqdm
-from multiprocess import pool
 
 import eniric
 from eniric.utilities import band_selector, mask_between, wav_selector
@@ -113,33 +113,42 @@ def rotational_convolution(
 
         return sum_val
 
-    tqdm_wav = tqdm(wavelength, disable=not verbose)
-
-    if num_procs is None:
-        num_procs = num_procs_minus_1
-
-    if isinstance(num_procs, int):
-        if num_procs not in [0, 1]:
-            with mprocess.Pool(processes=num_procs) as mproc_pool:
+    if vsini != 0:
+        tqdm_wav = tqdm(wavelength, disable=not verbose)
+
+        if num_procs is None:
+            num_procs = num_procs_minus_1
+
+        if isinstance(num_procs, int):
+            if num_procs not in [0, 1]:
+                with mprocess.Pool(processes=num_procs) as mproc_pool:
+                    convolved_flux = np.array(
+                        mproc_pool.map(element_rot_convolution, tqdm_wav)
+                    )
+
+            else:  # num_procs == 0  or num_procs == 1
+                convolved_flux = np.empty_like(wavelength)  # Memory assignment
+                for ii, single_wav in enumerate(tqdm_wav):
+                    convolved_flux[ii] = element_rot_convolution(single_wav)
+        else:
+            try:
+                # Assume num_procs was a multiprocess.pool.Pool
                 convolved_flux = np.array(
-                    mproc_pool.map(element_rot_convolution, tqdm_wav)
+                    num_procs.map(element_rot_convolution, tqdm_wav)
                 )
-
-        else:  # num_procs == 0  or num_procs == 1
-            convolved_flux = np.empty_like(wavelength)  # Memory assignment
-            for ii, single_wav in enumerate(tqdm_wav):
-                convolved_flux[ii] = element_rot_convolution(single_wav)
-    else:
-        try:
-            # Assume num_procs was a multiprocess.pool.Pool
-            convolved_flux = np.array(num_procs.map(element_rot_convolution, tqdm_wav))
-        except AttributeError:
-            raise TypeError(
-                "num_proc must be an int or a multiprocess Pool. Not '{}'".format(
-                    type(num_procs)
+            except AttributeError:
+                raise TypeError(
+                    "num_proc must be an int or a multiprocess Pool. Not '{}'".format(
+                        type(num_procs)
+                    )
                 )
-            )
-
+    else:
+        # Skip convolution for vsini=0
+        if wavelength is extended_wav:
+            convolved_flux = extended_flux  # No change
+        else:
+            # Interpolate to the new wavelength vector.
+            convolved_flux = np.interp(wavelength, extended_wav, extended_flux)
     return convolved_flux
 
 

Rotation of vsini=0.
**Describe the bug**
A `vsini=0` returns a Zero division error in rotation kernel.

  ```
File "/data/jneal/Code/repos/eniric/eniric/broaden.py", line 437, in rotation_kernel
    c1 = 2.0 * (1.0 - epsilon) / denominator
ZeroDivisionError: float division by zero

```

**To Reproduce**
Attempting rotational convolution with vsini=0.


**Expected behavior**
A rotation of 0 should leave the lines unbroadend so should be skipped.

Could also just try then check for ZeroDivisionError.

diff --git a/tests/test_broadening.py b/tests/test_broadening.py
index 2368a67..bd75ace 100644
--- a/tests/test_broadening.py
+++ b/tests/test_broadening.py
@@ -6,8 +6,8 @@ from multiprocess import Pool
 from eniric.broaden import (
     convolution,
     resolution_convolution,
-    rotational_convolution,
     rotation_kernel,
+    rotational_convolution,
     unitary_gaussian,
 )
 
@@ -165,3 +165,23 @@ def test_res_convolution_can_accept_None():
     x = np.linspace(2.0, 2.3, n)
     y = np.random.randn(n)
     resolution_convolution(x, x, y, R=100000, num_procs=None)
+
+
+@pytest.mark.parametrize("zero_vsini", [0, 0.00, np.int(0.0), np.float64(0.0)])
+def test_zero_rotation(zero_vsini):
+    n = 20
+    x = np.linspace(2.0, 2.3, n)
+    y = np.random.randn(n)
+    z = rotational_convolution(x, x, y, vsini=zero_vsini, num_procs=1)
+
+    assert np.all(y == z)
+
+
+@pytest.mark.parametrize("zero_vsini", [0, 0.00, np.int(0.0), np.float64(0.0)])
+def test_zero_rotation_with_different_x(zero_vsini):
+    n = 20
+    x = np.linspace(1000, 2300, n)
+    y = np.random.randn(n)
+    z = rotational_convolution(x[4:16], x, y, vsini=zero_vsini, num_procs=1)
+
+    assert np.all(y[4:16] == z)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest coverage hypothesis
apt-get update apt-get install -y gcc
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astropy==3.0.4
attrs==24.2.0
build==1.1.1
certifi @ file:///croot/certifi_1671487769961/work/certifi
check-manifest==0.50
coverage==7.2.7
cycler==0.11.0
dill==0.3.7
-e git+https://github.com/jason-neal/eniric.git@ae8dfefae3c00736c7700224729fd7450f794301#egg=eniric
exceptiongroup==1.2.2
hypothesis==6.79.4
importlib-metadata==6.7.0
iniconfig==2.0.0
joblib==0.12.5
kiwisolver==1.4.5
matplotlib==3.0.0
multiprocess==0.70.6
numpy==1.15.2
packaging==24.0
pandas==0.23.4
pluggy==1.2.0
pyparsing==3.1.4
pyproject_hooks==1.2.0
pytest==7.4.4
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==3.13
scipy==1.1.0
six==1.17.0
sortedcontainers==2.4.0
tomli==2.0.1
tqdm==4.25.0
typing_extensions==4.7.1
zipp==3.15.0

name: eniric
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astropy==3.0.4
      - attrs==24.2.0
      - build==1.1.1
      - check-manifest==0.50
      - coverage==7.2.7
      - cycler==0.11.0
      - dill==0.3.7
      - eniric==1.0rc1
      - exceptiongroup==1.2.2
      - hypothesis==6.79.4
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - joblib==0.12.5
      - kiwisolver==1.4.5
      - matplotlib==3.0.0
      - multiprocess==0.70.6
      - numpy==1.15.2
      - packaging==24.0
      - pandas==0.23.4
      - pluggy==1.2.0
      - pyparsing==3.1.4
      - pyproject-hooks==1.2.0
      - pytest==7.4.4
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==3.13
      - scipy==1.1.0
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tomli==2.0.1
      - tqdm==4.25.0
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/eniric

tests/test_broadening.py::test_zero_rotation[00] tests/test_broadening.py::test_zero_rotation[0.00] tests/test_broadening.py::test_zero_rotation[01] tests/test_broadening.py::test_zero_rotation[0.01] tests/test_broadening.py::test_zero_rotation_with_different_x[00] tests/test_broadening.py::test_zero_rotation_with_different_x[0.00] tests/test_broadening.py::test_zero_rotation_with_different_x[01] tests/test_broadening.py::test_zero_rotation_with_different_x[0.01]
tests/test_broadening.py::test_rot_convolution_with_bad_num_proc[3.14] tests/test_broadening.py::test_rot_convolution_with_bad_num_proc[str] tests/test_broadening.py::test_res_convolution_with_bad_num_proc[3.14] tests/test_broadening.py::test_res_convolution_with_bad_num_proc[str]
tests/test_broadening.py::test_rotational_kernel tests/test_broadening.py::test_unitary_gaussian tests/test_broadening.py::test_unitary_gaussian_type_errors tests/test_broadening.py::test_convolution_can_accept_int[1] tests/test_broadening.py::test_convolution_can_accept_int[2] tests/test_broadening.py::test_rot_convolution_can_accept_int[1] tests/test_broadening.py::test_rot_convolution_can_accept_int[2] tests/test_broadening.py::test_res_convolution_can_accept_int[1] tests/test_broadening.py::test_res_convolution_can_accept_int[2] tests/test_broadening.py::test_convolution_can_accept_worker_pool[1] tests/test_broadening.py::test_convolution_can_accept_worker_pool[2] tests/test_broadening.py::test_rot_convolution_can_accept_worker_pool[1] tests/test_broadening.py::test_rot_convolution_can_accept_worker_pool[2] tests/test_broadening.py::test_res_convolution_can_accept_worker_pool[1] tests/test_broadening.py::test_res_convolution_can_accept_worker_pool[2] tests/test_broadening.py::test_convolution_can_accept_None tests/test_broadening.py::test_rot_convolution_can_accept_None tests/test_broadening.py::test_res_convolution_can_accept_None
eniric/broaden.py
eniric/broaden.py