Skip to content

Commit

Permalink
Disabled non-completed features
Browse files Browse the repository at this point in the history
  • Loading branch information
proy30 committed Aug 5, 2024
1 parent 89aa970 commit 0a32b52
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from ...trame_setup import setup_server
server, state, ctrl = setup_server()
from mpi4py import MPI

from impactx import ImpactX

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ class DistributionFunctions:
User-Input section for beam distribution.
"""

@staticmethod
def class_parameters_with_defaults_twiss():
"""
Reads twissParameters.txt to obtain class parameters with default.
Temorary function until twiss parameters are in python bindings (8/4/24).
"""
# @staticmethod
# def class_parameters_with_defaults_twiss():
# """
# Reads twissParameters.txt to obtain class parameters with default.
# Temorary function until twiss parameters are in python bindings (8/4/24).
# """

file_path = "/mnt/c/Users/parth/Downloads/vsCode/TrameApplication/Input/distributionParametersCard/twissParameters.txt"
# file_path = "/mnt/c/Users/parth/Downloads/vsCode/TrameApplication/Input/distributionParametersCard/twissParameters.txt"

with open(file_path, "r") as file:
content = file.read()
local_vars = {}
exec(content, {}, local_vars)
return local_vars["twiss_parameters"]
# with open(file_path, "r") as file:
# content = file.read()
# local_vars = {}
# exec(content, {}, local_vars)
# return local_vars["twiss_parameters"]
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
state.listOfDistributionsAndParametersAndDefault = (
generalFunctions.class_parameters_with_defaults(DISTRIBUTIONS_MODULE_NAME)
)
state.listOfDistributionsAndParametersAndDefault_Twiss = (
DistributionFunctions.class_parameters_with_defaults_twiss()
)
# state.listOfDistributionsAndParametersAndDefault_Twiss = (
# DistributionFunctions.class_parameters_with_defaults_twiss()
# )

# -----------------------------------------------------------------------------
# Default
Expand All @@ -46,18 +46,11 @@ def populate_distribution_parameters(selectedDistribution):
whos parameters need to be populated.
"""

if state.selectedDistributionType == "Twiss":
selectedDistributionParameters = (
state.listOfDistributionsAndParametersAndDefault_Twiss.get(
selectedDistribution, []
)
)
else:
selectedDistributionParameters = (
state.listOfDistributionsAndParametersAndDefault.get(
selectedDistribution, []
)
selectedDistributionParameters = (
state.listOfDistributionsAndParametersAndDefault.get(
selectedDistribution, []
)
)

state.selectedDistributionParameters = [
{
Expand Down Expand Up @@ -200,6 +193,7 @@ def card():
items=(["Native", "Twiss"],),
# change=(ctrl.kin_energy_unit_change, "[$event]"),
dense=True,
disabled=True,
)
with vuetify.VRow(classes="my-2"):
for i in range(3):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ class InputParameters:
"""

def __init__(self):
state.particle_shape = 1
state.npart = 100
state.particle_shape = 2
state.npart = 1000
state.kin_energy = 2.0e3
state.kin_energy_MeV = state.kin_energy
state.bunch_charge_C = 2e5
state.bunch_charge_C = 1.0e-9
state.kin_energy_unit = "MeV"
state.old_kin_energy_unit = "MeV"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def dialog_lattice_settings():
with vuetify.VCard():
with vuetify.VTabs(v_model=("tab", "Settings")):
vuetify.VTab("Settings")
vuetify.VTab("Variable Referencing")
# vuetify.VTab("Variable Referencing")
vuetify.VDivider()
with vuetify.VTabsItems(v_model="tab"):
with vuetify.VTabItem():
Expand All @@ -439,28 +439,28 @@ def dialog_lattice_settings():
style="max-width: 75px",
classes="ma-0 pa-0",
)
with vuetify.VTabItem():
with vuetify.VContainer(
fluid=True,
style="background-color: #f5f5f5; padding: 16px; border-radius: 8px;",
):
with vuetify.VRow():
with vuetify.VCol(cols="3"):
vuetify.VTextField(
label="Variables",
style="max-width: 100px; font-family: 'Courier New', monospace;",
)
with vuetify.VCol(cols="1"):
vuetify.VInput(
"=",
style="max-width: 40px; font-family: 'Courier New', monospace; text-align: center; margin-top: 25px;",
)
with vuetify.VCol(cols="7"):
vuetify.VTextField(
label="Formula",
style="max-width: 300px; font-family: 'Courier New', monospace;",
)
with vuetify.VCol(cols="1"):
vuetify.VIcon(
"mdi-plus", hide_details=True, classes="ma-0"
)
# with vuetify.VTabItem():
# with vuetify.VContainer(
# fluid=True,
# style="background-color: #f5f5f5; padding: 16px; border-radius: 8px;",
# ):
# with vuetify.VRow():
# with vuetify.VCol(cols="3"):
# vuetify.VTextField(
# label="Variables",
# style="max-width: 100px; font-family: 'Courier New', monospace;",
# )
# with vuetify.VCol(cols="1"):
# vuetify.VInput(
# "=",
# style="max-width: 40px; font-family: 'Courier New', monospace; text-align: center; margin-top: 25px;",
# )
# with vuetify.VCol(cols="7"):
# vuetify.VTextField(
# label="Formula",
# style="max-width: 300px; font-family: 'Courier New', monospace;",
# )
# with vuetify.VCol(cols="1"):
# vuetify.VIcon(
# "mdi-plus", hide_details=True, classes="ma-0"
# )
2 changes: 1 addition & 1 deletion src/python/impactx/dashboard/Toolbar/toolbarMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def input_toolbar():

# ToolbarElements.file_upload()
vuetify.VSpacer()
ToolbarElements.select_visualization()
# ToolbarElements.select_visualization()
ToolbarElements.run_simulation_button()
# ToolbarElements.export_input_data()
# ToolbarElements.switch_theme()
Expand Down

0 comments on commit 0a32b52

Please sign in to comment.