Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grotrian Diagram Plot Appearance (#2313)
* Grotrian diagram mockup 0 * Use atomic data to get energy levels * Get line data from simulation object using LastLineInteraction class * Remove transition where start and end (merged) levels is the same * Refactor to GrotrianWidget class * Add hovertext and colorbar * Fix NUM_SHELLS variable * Convert code into modular format * Normalize wavelength by min and max value of the selected ion, instead of global min and max * Create APIs for setting plot wavelength range manually * Make y-axis linear in level_number instead of level_energy * Rename num_electrons to standard_log_num_electrons while building plot * Stardardize level population numbers * Fix stardardization division by zero if only one element present in data * Fix roman notation of ion number * Display ground level too * Change level populations to scientific notation in hovertext * Put Angstrom symbol in colorbar instead of full name * Standardize num_electrons using a common range for both excitation and de-excitation lines * Fix the problem of arrows not touching the levels. (Used add_traces for arrows instead of add_annotation) * Refactor duplicated code logic * Put hoverinfo on transition arrows * Put standardization logic into compute functions instead of draw functions * Add width scale for level populations * Format electron count to be an int instead of float in hovertext * Wavelength range in colorbar should be confined to the displayed transitions only by default * Set default colorscale to Rainbow for wavelengths * Allow user to set atomic number and ion number simultaneously * Handle ground state transitions correctly. Display dashed lines for levels with no level population * Add basic docstrings * Scientific formatting for level energies * Display level populations based on supernova zone * Put relative x-coordinate * Add width scale for transition arrow widths * Change y-axis from level number to log energies * Minor margin changes * Disable zooming * Move width references to the left and colorbar to the right * Refactor code. Remove duplication and hardcodings * Add in/out last line interaction shell ids for real and virtual packets * Add API for filtering data by supernova shell * Add selected shell in plot title * Do not handle last_line_interaction_in_shell_id and last_line_interaction_out_shell_id separately * Do not reset custom wavelength range when the shell is changed * Sync mockup notebook with master * Fixed plot width and reference bars * Added docstrings for remaining methods * Added log option for y-scale * Resolve Black issue * Fix docstrings and make variable names more informative * - Renamed 'colorscale' to 'cmapname' - Allow 'colorscale' to be changed by user - Fixed the access specifiers of editable attributes vs non-editable attributes * Force user to set ion explicitly before plotting * Add information for the configurable attributes in the class docstring * Remove hardcoding in the unit conversion for level energies * Fix arrowhead issue in VSCode * Display info message that wavelengths will be reset when ion changes * Add ability to change level_diff_threshold, max_levels, and filter_mode * Added default parameter values in docstrings and updated comments * Make all setters atomic operations
- Loading branch information