dran 0.0.44
Data reduction and analysis of HartRAO 26m telescope drift scans
Requires Python: >=3.8
Keywords: dran,single-dish,hartrao

DRAN README
===========

**DRAN** is a data reduction and analysis software pipeline developed to systematically reduce and analyze 
[HartRAO's ](http://www.hartrao.ac.za) [26m telescope](http://www.hartrao.ac.za/hh26m_factsfile.html) drift scan data. The software is a new development intended to replace the old LINES continuum data reduction and analysis program previously used at HartRAO. The program began as part of the Ph.D. projects for Pfesesani Van Zyl and is now mantained by the author 
who is currently a postdoc at [SARAO (the South African Radio AStronomy Observatory](http://www.sarao.ac.za/).

Acknowledging DRAN
-------------------
To acknowledge DRAN in a publication please cite [van Zyl P. 2023](https://ui.adsabs.harvard.edu/abs/2023arXiv230600764V/abstract).



Program structure 
------------------

This program is built using [Python](http://www.python.org) 3.9 and consists of two interfaces: 

* CLI - A command-line interface and, 
* GUI - A graphical user interface. [To be added at a later stage]

The CLI handles the automated and semi-automated data reduction and analysis of drift scan files, 
whereas the GUI is more aligned with handling single file inspection and fitting. 
The GUI also has features that allow for simple data analysis of timeseries data generated by the 
CLI.

Requirements
-------------

All required packages are in the requirements.txt file supplied with the software.


Installation 
-------------

The DRAN program is readily available on the [PYPI package manager](https://pypi.org) and can be nstalled using

``` 
  $ pip install dran
```

Data files
----------

### Input file format
The program assumes that all raw files to be processed are strictly in [FITS](https://fits.gsfc.nasa.gov/fits_documentation.html) file format. 

### File reading:
A file can be read in through 2 main ways

1. The user explicilty gives the full path of the file / folder they want to process e.g.

```
$ dran-auto -f path/to/my_awesome_file.fits
```
or
```
$ dran-auto -f path/to/my_awesome_folder
```

2. The user selects the file using the available options through the use of a dialog box in the GUI. [Future release]


### Output file format
After processing the results are then stored in an SQLite database which will appear in the users current working directory.


Quickstart
----------

After the successful installation of the program you can now begin with processing the data.  To dive right in you can type the following command

```
$ dran-auto -h
```

The above command prints out the set of options listed below,

```

usage: DRAN-AUTO [-h] [-db DB] [-f F] [-delete_db DELETE_DB] [-conv CONV]
                 [-quickview {y,yes}] [-version]

Begin processing HartRAO drift scan data

optional arguments:
  -h, --help            show this help message and exit
  -db DB                turn debugging on or off. e.g. -db on, by default
                        debug is off
  -f F                  process file or folder at given path e.g. -f data/Hydr
                        aA_13NB/2019d133_16h12m15s_Cont_mike_HYDRA_A.fits or
                        -f data/HydraA_13NB
  -delete_db DELETE_DB  delete database on program run. e.g. -delete_db all or
                        -delete_db CALDB.db
  -conv CONV            convert database tables to csv. e.g. -conv CALDB
  -quickview {y,yes}    get quickview of data e.g. -quickview y
  -version              show program's version number and exit
```


Depending on the process you want to run, you can select one or more of the available options. 


> `note:` If there are more options you would like implemented please email the author, details are listed below.


Caveats
-------

Although the program tries to fit the data appropriately there 
are a few things the user needs to be aware of. The program tries 
its best to fit all the data (good/bad). However the onus is still 
on the user to check/insure the scans have been fit in a satisfactory 
manner by checking the results in the plots folder.


Author contacts
---------------

If you have any problems with the code, have questions, ideas or suggestions, please 
[OPEN AN ISSUE](https://github.com/Pfesi/dran/issues).