<commit_before># meerkat
A python library for performing reciprocal space reconstruction from single crystal x-ray measurements. 

## Installation
The package can be installed using pip:

    pip install meerkat

## Usage

The reciprocal space reconstruction is based on the orientation matrix determined by [XDS](“xds.mpimf-heidelberg.mpg.de”). Thus, in order to run the reconstruction, in addition to the diffraction frames, `meerkat` requires either `XPARM.XDS` or `GXPARM.XDS`.

The reconstruction can be run using the following python script:

```
from meerkat import reconstruct_data

#reconstruct dataset
reconstruct_data(filename_template='../frames/PdCPTN01002_%05i.cbf,
        first_image=1,
        last_image=3600,
        reconstruct_in_orthonormal_basis=False,
        maxind=[4,5,16], #the reconstruction will be made for h=-4...4, k=-5...5, l=-16...16
        number_of_pixels=[801, 801, 801], #The resulting size of the array. Controls the step size<commit_msg>Added comment for Windows anaconda users<commit_after># meerkat
A python library for performing reciprocal space reconstruction from single crystal x-ray measurements. 

## Installation
The package can be installed using pip:

    pip install meerkat
    
On Windows we recommend to use virtual environments like [anaconda](https://store.continuum.io/cshop/anaconda/) which simplify python installation. 

#### Troubleshoot for anaconda users

Some anaconda distributions fail on `pip install meerkat` while trying to compile `h5py`. In this case the following commands work:

```
pip install meerkat --no-deps
pip install fabio
```

Since anaconda comes with preinstalled `h5py` it is not required to reinstall it with pip, and the following command resolves all dependencies.

## Usage

The reciprocal space reconstruction is based on the orientation matrix determined by [XDS](“xds.mpimf-heidelberg.mpg.de”). Thus, in order to run the reconstruction, in addition to the diffraction frames, `meerkat` requires either `XPARM.XDS` or `GXPARM.XDS`.

The reconstruction can be run using the following python script:

```
from meerkat import reconstruct_data

#reconstruct dataset
reconstruct_data(filename_template='../frames/PdCPTN01002_%05i.cbf,
        first_image=1,
        last_image=3600,
        reconstruct_in_orthonormal_basis=False,
        maxind=[4,5,16], #the reconstruction will be made for h=-4...4, k=-5...5, l=-16...16
        number_of_pixels=[801, 801, 801], #The resulting size of the array. Controls the step size
{'fraction_non_alphanumeric': 0.08359872611464968, 'fraction_numerical': 0.027070063694267517, 'mean_word_length': 4.381156316916488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2903664', 'n_tokens_mistral': 782, 'n_tokens_neox': 709, 'n_words': 275}