ovro-eovsa / ovro-lwa-solar

Calibration, imaging, and analysis of solar data taken by the Owens Valley Long Wavelength Array (OVRO-LWA)
MIT License
5 stars 6 forks source link

Add pytest and profiling, switch from setup.py to pyproject.toml #90

Closed peijin94 closed 5 months ago

peijin94 commented 6 months ago

related to https://github.com/ovro-eovsa/ovro-lwa-solar/issues/86

I left the decorator @profile on some of the functions for future profiling. The decorator @profile will only be activated when the script is running with the command kernprof myscritp.py

To run the profiler,

# active the env
# pip install line_profiler
python -m kernprof -lvr profiling.py

To run the test:

# pip install pytest
pytest tests/test_modules.py
surajit4444mondal commented 6 months ago

Is it possible to use the logging level to determine whether we want wsclean to run quietly? Then we do not need to pass "quiet" as an argument to do_selfcal.

Also can you please also add in the issue how to run the profiler?

peijin94 commented 6 months ago

Is it possible to use the logging level to determine whether we want wsclean to run quietly? Then we do not need to pass "quiet" as an argument to do_selfcal.

Also can you please also add in the issue how to run the profiler?

PR description updated