Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSoC Objective-1 Rewrite the TARDIS visualisation module using Panel #2990

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rudrakshnalbalwar
Copy link

@rudrakshnalbalwar rudrakshnalbalwar commented Feb 22, 2025

Type: 🚀 Feature | ☣️ Breaking Change | 📝 Documentation

🔹 This PR migrates the TARDIS visualization module to Panel, eliminating dependencies on qgrid, qgridnext, and IPython. This transition improves compatibility with Sphinx documentation while maintaining full interactivity.

🔹 The hierarchical dataset is now visualized as interlinked tables using SimulationShellInfo:

Selecting a row in the shell data table dynamically updates the element abundances table.
Further selection in the element abundances table updates additional tables showing ion count and level count.
🔹 The widget is fully operational in:

Jupyter Notebooks (inline execution)

📌 Resources

Full Video [watch here]
https://drive.google.com/drive/folders/1YX5T1tSHyy8AaJRWUM8WE__Y4BRUfObF?usp=sharing

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tardis-bot
Copy link
Contributor

*beep* *bop*
Hi human,
I ran ruff on the latest commit (c80f7a6).
Here are the outputs produced.
Results can also be downloaded as artifacts here.
Summarised output:

4	F401	[*] `numpy` imported but unused
2	I001	[*] Import block is un-sorted or un-formatted
2	F821	[ ] Undefined name `GrotrianWidget`
1	E999	[ ] SyntaxError: Expected an expression
1	W292	[*] No newline at end of file

Complete output(might be large):

.mailmap:1:38: E999 SyntaxError: Expected an expression
docs/analysing_tardis_outputs/visualization/how_to_generating_widgets.ipynb:cell 5:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/analysing_tardis_outputs/visualization/how_to_generating_widgets.ipynb:cell 5:1:17: F401 [*] `panel` imported but unused
docs/analysing_tardis_outputs/visualization/how_to_generating_widgets.ipynb:cell 14:1:20: F821 Undefined name `LineInfoWidget`
docs/analysing_tardis_outputs/visualization/how_to_generating_widgets.ipynb:cell 19:1:23: F821 Undefined name `GrotrianWidget`
tardis/visualization/widgets/shell_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/shell_info.py:1:20: F401 [*] `tardis.run_tardis` imported but unused
tardis/visualization/widgets/shell_info.py:2:33: F401 [*] `tardis.io.atom_data.download_atom_data` imported but unused
tardis/visualization/widgets/shell_info.py:8:17: F401 [*] `numpy` imported but unused
tardis/visualization/widgets/shell_info.py:391:44: W292 [*] No newline at end of file
Found 10 errors.
[*] 7 fixable with the `--fix` option.

@tardis-bot
Copy link
Contributor

tardis-bot commented Feb 22, 2025

*beep* *bop*

Hi, human.

The docs workflow has failed

Click here to see the build log.

Comment on lines -513 to -520
Parameters
----------
hdf_fpath : str
A valid path to a simulation HDF file (HDF file must be created
from a TARDIS Simulation object using :code:`to_hdf` method with
default arguments)

Returns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove them?

Comment on lines -229 to -233
It consists of four interlinked table widgets - shells table; element count,
ion count and level count tables - allowing to explore fractional abundances
all the way from elements, to ions, to levels by clicking on the rows of
tables.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I aimed to make docstring more concise while maintaining clarity,.However, if the additional details are necessary for completeness, I’m open to refining the balance between brevity and informativeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants