<commit_before># Database_Extraction_Tool


### Outline of Program
The end goal of the project is to create a cohesive and intuitive GUI which can be used to effectively sort through two large databases for nuclear structural data and atomic binding data. This GUI will plot the data obtained from the two databases and allow for the user to study properties of excited nuclei more systematically.

This program has 2 functions: 
1. Produce plots of nuclear states requested by the user. 
2. Return an array of relevant atomic mass data.



### How to run this program:
1. Run the `THIS WORKS.py` script. 
2. Enter appropriate values and click the corresponding submit button. (example: Zn, Alow 60, Ahigh 67, J 0+,3/2-,2-, E 5000).
3. Requested plots (and the corresponding individual text files containing data exported from the ensdf.xxx files) will appear in the `Outputs/gnuPlot` directory.
4. The requested atomic mass data will be displayed in the text box within the GUI. 



### How this program operates:
There are several scripts which interact with eachother to produce plots and outputs. When the user runs `THIS WORKS.py`, two commands are executed- the first runs the `datExp` function from the `isotopeDataExportingDat.py` script with inputs (True, True). The `datExp` function takes the user's inputs and feeds them into the `data` function from the dataClass.py script. The `data` function contains an algorithm which finds the data requested by the user (extracts the relevant information from the appropriate ensdf.xxx data file) and saves it into text files for each isotope in the range requested by the user. 
The second command executed runs the `pltFileExp` function from the `isotopeDataExportingDat.py` script. The `pltFileExp` function reads the text files generated by the first command and produces a single gnuPlot using data from all the text files generated.



### What happens when I click 'Submit'?
When the user clicks the submit button on the left in the GUI this does two things. First, user inputs are stored as variables which can be fed into the other scripts. The second action taken is the GUI window closes. When the GUI closes the `THIS WORK.py` commands are executed. 



### Improvements/Problems:

- Any errors or messages that appear in the shell should appear in textbox. The user should never have to interact with the shell (i.e. 'Press Enter to Continue' is not good.), everything should be self contained within the GUI frame.

- How to handle Theory and Sym inputs

- Formatting: Text box, input fields, labels, etc. could be refined. 


## Version Tracking:

Version history can be found in the Change Log, [here.](http://github.com/ElectroweakGroup/Database_Extraction_Tool/blob/master/Changelog.txt)
>>>>>>> aa85c5c9e79df70089bfc4c3f4991c3f13123973<commit_msg>Updated Read Me<commit_after># Database_Extraction_Tool


### Outline of Program
The end goal of the project is to create a cohesive and intuitive set of GUIs which can be used to effectively sort through large databases for nuclear structural data and atomic binding data. This will allow for an easy, systematic study of excited nuclear states, atomic mass data, and beta decay transitions.

This program has 3 functions: 
1. Produce plots of nuclear states requested by the user.
2. Return an array of relevant atomic mass data.
3. Produce plots of nuclear states with beta decay data.



### How to run this program:
1. Run the `USE_THIS.py` script.
2. Click on the desired function. 
3. Input appropriate values and select options necessary before hitting the appropriate submit button.
4. Requested plots will appear in the GUI when it reopens, and actual data can be found in the `Outputs/gnuPlot` directory.



### How this program operates:
There are several scripts which interact with each other to produce the plots and outputs, When the user runs `USE_THIS.py`, a GUI opens asking which subsequent program to run. Each of these programs runs independently. 

The first program calls `isotopeDataExportingDat.py` and allows for a significant number of inputs, allowing the user to access a larger range of data with more customizability. This program collects desired data from ensdf.xxx data files as well as mass16.txt files and plots the desired output. All data is saved to the `Output/gnuPlot` file, with plots being saved as .png.

The second command executed runs the `pltFileExp` function from the `isotopeDataExportingDat.py` script. The `pltFileExp` function reads the text files generated by the first command and produces a single gnuPlot using data from all the text files generated.

The third button runs as the first one does, but with a limited set of options and pre-set commands built in to call additional isotopes for the different types of Beta decay.



### What happens when I click 'Submit'?
When the user clicks any of the submit buttons, the input values are sent to the rest of the program which allows the data to be extracted from the files and plotted.



### Improvements/Problems:

- How to handle Theory and Sym inputs


## Version Tracking:

Version history can be found in the Change Log, [here.](http://github.com/ElectroweakGroup/Database_Extraction_Tool/blob/master/Changelog.txt)
>>>>>>> aa85c5c9e79df70089bfc4c3f4991c3f13123973
{'fraction_non_alphanumeric': 0.05076429515002831, 'fraction_numerical': 0.015285903000566144, 'mean_word_length': 4.486542443064182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3121744', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1289, 'n_words': 789}