<commit_before>mwstreams
=========

**DESCRIPTION:**

mwstreams is a Python Library and Toolkit for visualizing streams and overdensities known in the Milky Way (MW).

The main contributions of this toolkit are the following:

- The current distribution provides tools to handle and plot each stream's footprint in different coordinate systems. 

- Utility methods are provided to automatically add all MW known globular clusters and dwarf galaxy satellites.

- The MWStreams class provides an object to handle the data for all known streams in the MW

- The gcutils library provides utility methods that will let you create a footprint object for your own stream, defining it in one of the following four ways:

  - by giving the coordinates of the start and end point
  - by giving the orbital pole, and if known its center, length and width 
  - by giving a range of RA/DEC or l/b  (more suitable for clouds rather than for streams)
  - by giving a list of coordinates 

----------

**REQUIREMENTS**

- Python modules required are NUMPY and SCIPY. MATPLOTLIB is needed for plotting utilities.
- This toolkit makes use of the coordinate transformation library bovy_coords.py from the galpy package by <NAME> (2015, in prep.). It is supplied with this bundle.

----------

**INSTALLATION**

In a terminal, run the following command::

    sudo python setup.py install 

Source your .cshrc

If you do not have root access, you can install in the custom directory path_to_dir.
First, add the directory's path path_to_dir and path_to_dir/lib/python2.7/site-packages/
to the PYTHONPATH variable in your .cshrc/.bashrc file and source it. Then install using the --prefix option::

    python setup.py install --prefix=path_to_dir

Add path_to_dir/bin to your PATH in your .csrhc or .bashrc file.

*This is not set up yet, but will be soon.*

----------

Quick Guide
===========

A MWstreams object can be easily created as follows::

	mwsts=mwstreams.MWStreams(verbose=True)

Running this in verbose mode will print the each of the library’s stream names as they are initialized.

To quickly plot the the stream’s library stored in it use:: 

	fig=plt.figure(1,figsize=(16,8))
	ax=fig.add_subplot(111)
	mwsts.plot_stream_compilation(ax,plot_colorbar=True)

(plot not shown)

the plot is made in equatorial coordinates by default, but heliocentric galactic and galactocentric spherical coordinates can also be used. For more details on available MWStreams methods see XXX-link-here.

To overplot the positions of MW globular clusters use::

	mwstreams.plot_globular_clusters(ax)

----------

The Built-in Streams Library
============================

The data for the built-in streams library is stored in the *lib* directory, where four main files are found, depending on which method is used in mwstreams.MWStreams to
define a stream’s footprint:

- lib_by_pair.dat (input: coordinates of the start and end point)
- lib_by_pole.dat (input: orbital pole, and optionally center, length and width) 
- lib_by_lonlat_range.dat (input: range of RA/DEC or l/b)
- lib_by_star.log (input: star list. this is a log file where the format and location of the star list files are set for each defined stream)  
 

The following table summarizes the streams included in the library. The list of streams is based in the Grillmair & Carlin (2015) review (their Table 4.1) and updated as of 06/May/2017.

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column
<commit_msg>testing table fmt<commit_after>mwstreams
=========

**DESCRIPTION:**

mwstreams is a Python Library and Toolkit for visualizing streams and overdensities known in the Milky Way (MW).

The main contributions of this toolkit are the following:

- The current distribution provides tools to handle and plot each stream's footprint in different coordinate systems. 

- Utility methods are provided to automatically add all MW known globular clusters and dwarf galaxy satellites.

- The MWStreams class provides an object to handle the data for all known streams in the MW

- The gcutils library provides utility methods that will let you create a footprint object for your own stream, defining it in one of the following four ways:

  - by giving the coordinates of the start and end point
  - by giving the orbital pole, and if known its center, length and width 
  - by giving a range of RA/DEC or l/b  (more suitable for clouds rather than for streams)
  - by giving a list of coordinates 

----------

**REQUIREMENTS**

- Python modules required are NUMPY and SCIPY. MATPLOTLIB is needed for plotting utilities.
- This toolkit makes use of the coordinate transformation library bovy_coords.py from the galpy package by <NAME> (2015, in prep.). It is supplied with this bundle.

----------

**INSTALLATION**

In a terminal, run the following command::

    sudo python setup.py install 

Source your .cshrc

If you do not have root access, you can install in the custom directory path_to_dir.
First, add the directory's path path_to_dir and path_to_dir/lib/python2.7/site-packages/
to the PYTHONPATH variable in your .cshrc/.bashrc file and source it. Then install using the --prefix option::

    python setup.py install --prefix=path_to_dir

Add path_to_dir/bin to your PATH in your .csrhc or .bashrc file.

*This is not set up yet, but will be soon.*

----------

Quick Guide
===========

A MWstreams object can be easily created as follows::

	mwsts=mwstreams.MWStreams(verbose=True)

Running this in verbose mode will print the each of the library’s stream names as they are initialized.

To quickly plot the the stream’s library stored in it use:: 

	fig=plt.figure(1,figsize=(16,8))
	ax=fig.add_subplot(111)
	mwsts.plot_stream_compilation(ax,plot_colorbar=True)

(plot not shown)

the plot is made in equatorial coordinates by default, but heliocentric galactic and galactocentric spherical coordinates can also be used. For more details on available MWStreams methods see XXX-link-here.

To overplot the positions of MW globular clusters use::

	mwstreams.plot_globular_clusters(ax)

----------

The Built-in Streams Library
============================

The data for the built-in streams library is stored in the *lib* directory, where four main files are found, depending on which method is used in mwstreams.MWStreams to
define a stream’s footprint:

- lib_by_pair.dat (input: coordinates of the start and end point)
- lib_by_pole.dat (input: orbital pole, and optionally center, length and width) 
- lib_by_lonlat_range.dat (input: range of RA/DEC or l/b)
- lib_by_star.log (input: star list. this is a log file where the format and location of the star list files are set for each defined stream)  
 

The following table summarizes the streams included in the library. The list of streams is based in the Grillmair & Carlin (2015) review (their Table 4.1) and updated as of 06/May/2017.

{'fraction_non_alphanumeric': 0.07921219091431857, 'fraction_numerical': 0.007475560667050029, 'mean_word_length': 3.9445628997867805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '850308', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1863, 'n_words': 968}