state.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { material } from 'src/store/simulation-setup/state';
  2. // All numbers with units (e.g. size, radius, wavelength, e.g.) are given in nanometers.
  3. export interface guiRuntimeStateInterface {
  4. isShowingHelpForInputWithUnits: boolean;
  5. units: string;
  6. sourceUnits: string;
  7. isSourceSameUnits: boolean;
  8. activatedMaterials: material[];
  9. safeFromWL: number;
  10. safeToWL: number;
  11. isSaveWithPythonScript: boolean;
  12. isAutoRefineNearField: boolean;
  13. plotRatio: number;
  14. plotRatioLabel: string;
  15. colorscale: string;
  16. isLogColorscale: boolean;
  17. nearFieldZoom: { fromX: number; toX: number; fromY: number; toY: number };
  18. }
  19. function state(): guiRuntimeStateInterface {
  20. return {
  21. isShowingHelpForInputWithUnits: true,
  22. units: 'nm',
  23. sourceUnits: 'nm',
  24. isSourceSameUnits: true,
  25. safeFromWL: 0,
  26. safeToWL: 1e300,
  27. isSaveWithPythonScript: true,
  28. nearFieldZoom: { fromX: 0, toX: 1, fromY: 0, toY: 1 },
  29. isAutoRefineNearField: true,
  30. plotRatio: 1,
  31. plotRatioLabel: 'fixed',
  32. colorscale: 'Jet',
  33. isLogColorscale: false,
  34. activatedMaterials: [
  35. // 'PEC',
  36. {
  37. name: 'link',
  38. spectrumRangeStart: 0,
  39. spectrumRangeEnd: 1e300,
  40. nSpline: undefined,
  41. kSpline: undefined,
  42. isPlot: false,
  43. },
  44. {
  45. name: 'nk-constant',
  46. spectrumRangeStart: 0,
  47. spectrumRangeEnd: 1e300,
  48. nSpline: undefined,
  49. kSpline: undefined,
  50. isPlot: false,
  51. },
  52. ],
  53. };
  54. }
  55. export default state;