<jupyter_start><jupyter_text>Build the HR from a FERMIBURST QueryFirst we create a HR builder object<jupyter_code>hrb = HardnessDurationBuilder()<jupyter_output><empty_output><jupyter_text>Put in a query on the online FERMIBURST catalog parameters. E.g. t90>0 should be all GRBs<jupyter_code>hrb.catalog.query('.01<t90<20')<jupyter_output><empty_output><jupyter_text>One we have our selection, we must go through and build the models. This routine selects the best fitting model (input 'fluence'[default] or 'peak') according the GBM online catalog. **This step can take a few minutes.**<jupyter_code>hrb.build_sample()<jupyter_output><empty_output><jupyter_text>Now select the intervals for the HRs. Both a photon and an energy HR are calculted.<jupyter_code>hrb.compute_hardness_ratios(10,50,50,300)<jupyter_output><empty_output><jupyter_text>We can view and access the data like so,<jupyter_code>hrb.hr_table<jupyter_output><empty_output><jupyter_text>PlottingThe plots are easy to obtain<jupyter_code>_ = hrb.plot_photon()
_ = hrb.plot_energy()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09554730983302412, 'fraction_numerical': 0.016697588126159554, 'mean_word_length': 8.464912280701755, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 26, '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}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '299344', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 397, 'n_tokens_neox': 377, 'n_words': 94, 'path': 'examples/demo.ipynb', 'repo_name': 'grburgess/pyhardrat', 'size': '1078'}