Frequently Asked Questions
--------------------------

1. I have run :func:`gen_freq()` for some choice of ``nu``. But now want to regenerate the ``Tb_nu_map`` data for a different choice of ``nu``. Do I need to rerun :func:`ref_freq()`?

   No. :func:`ref_freq()` is not tied to ``nu`` because ``nu`` is given to function :func:`gen_freq()`. Thus, if users want to use the same data for source distribution (``n_ps.npy``), flux density (``Tb_o_individual.npy``) and spectral index (``beta.npy``) assignments at reference frequency to generate spectrum and sky maps for a different frequency range, then run only :func:`gen_freq()` for a new choice of ``nu``.

2. I want to try different figures available in :func:`visual()`. Do I need to rerun :func:`ref_freq()` and :func:`gen_freq()`?

   No. If you have already run :func:`ref_freq()` and :func:`gen_freq()` and are happy with the specifications of the model, then you can directly jump to the :func:`visual()` function.

3. I have already run :func:`ref_freq()` and :func:`gen_freq()` functions but want to try out :func:`couple2D` for different beam directivities. Do I need to rerun :func:`ref_freq()` and :func:`gen_freq()`?
   
   No. Once again :func:`couple2D` is not tied to :func:`ref_freq()` or :func:`gen_freq()`. Once the data is generated by these functions, :func:`couple2D` will do its job by loading that data.
   
4. When I run ``visual()``, I get the following error 

   ``RuntimeError: Failed to process string with tex because latex could not be found``

   How to rectify this?


   **Solution**: This is probably because you do not have a proper LaTeX installation. Run the following commands on your terminal

   .. code:: bash

      sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super
      pip install latex

   Solution borrowed from `Stack Overflow -failed-to-process-string <https://stackoverflow.com/questions/58121461/runtimeerror-failed-to-process-string-with-tex-because-latex-could-not-be-found>`_.


5. I am getting the following error

   ``ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects``

   when I install :mod:`mpi4py`.

   **Solution**: Run the following commands on your terminal 

   .. code:: bash

      sudo apt update
      sudo apt-get install libopenmpi-dev 
   
   Solution borrowed from `Stack Overflow -could-not-build-wheels <https://stackoverflow.com/questions/74427664/error-could-not-build-wheels-for-mpi4py-which-is-required-to-install-pyproject>`_.   


6. Will this package run on windows?

   No, because it uses :mod:`healpy` and since :mod:`healpy` is not (yet) supported on windows, this package cannot be used on windows. However, there is still a workaround without having to dual boot your PC with ubuntu. You can use the Windows Subsystem for Linux (WSL). See the official `ubuntu <https://ubuntu.com/desktop/wsl>`_ page and `this <https://learn.microsoft.com/en-us/windows/wsl/install>`_ page.


