GithubHelp home page GithubHelp logo

jet's Introduction

JET

Welcome to the CHERAB project. This is the JET specific machine package.

Please see our documentation for guidance on using the code.

jet's People

Contributors

cnlpepper avatar jacklovell avatar mattngc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jet's Issues

Update default path to CAD files

The path /projects/cadmesh/ does not exist on JET Data Center computing nodes. However, the path /common/cadmesh/ works for both UKAEA and JDC nodes. I suggest updating the default for CADMESH_PATH to /common/cadmesh/.

Update setup.py and add pyproject.toml

Installing this package via pip ends up in error because of the cython dependency in setup.py. There are no cython files in the project now.

I will change the setup.py and add pyproject.toml (simmilar to what MAST package uses)

Modernise load_kb5_camera

Load the KB5H or KB5V meshes as the camera geometry in load_kb5_camera. This will save users having to load it separately to make accurate observations.

KB5 bolometers should have their corresponding meshes set as camera_geometry

There are KB5V and KB5H mesh files available, but these are not loaded when load_kb5_camera is called. At the moment, they are loaded manually in the sensitivity and etendue calculation demos.

Observations using these cameras will only be meaningful if the mesh geometry is loaded, so it should be loaded along with the slits and foils and not left to the end user to do.

Fix KS5 demos

Running one of the KS5 demonstrations (spectra_76666.py or camera_76666.py) throws the following error:

Traceback (most recent call last):
  File "cherab-jet/demos/diagnostic/ks5/spectra_76666.py", line 74, in <module>
    flow_velocity_tor_psi = Interpolate1DCubic(psi_coord, flow_velocity_tor_data)
  File "cherab/core/math/interpolators/interpolators1d.pyx", line 426, in cherab.core.math.interpolators.interpolators1d.Interpolate1DCubic.__init__
  File "cherab/core/math/interpolators/interpolators1d.pyx", line 82, in cherab.core.math.interpolators.interpolators1d._Interpolate1DBase.__init__
ValueError: The f array must be 1D.

Probably, this happens because the data arrays returned by the version of SAL currently installed on JET cluster have different indexing order compared to the SAL version that was used when these demos were created.

After making the appropriate changes, I have successfully run these demos, so I'll make a PR shortly.

Change jetdata.sal to sal

jetdata.sal is currently accessible only at ccfe gitlab.

Change the jetdata.sal to sal to make the dependency available

Add support for KS3 spectroscopy diagnostic

The data from KS3 spectroscopy is used for benchmarking the EDGE2D-Eirene, SOLPS and ERO 2.0 simulations. Having the KS3 lines of sight in the Cherab module for JET would allow, for example, to estimate the levels of reflected light in the measured signals.

For KS3 sight lines, it is important to consider the non-zero acceptance angle of the observation cones, so they should be modelled with FibreOptic and not SightLine. Hence, a possible solution would be to update SpectroscopicSightLine in cherab.tools to support both SightLine and FibreOptic observers.

KB5 Edge2D demo is broken

The demos/diagnostic/kb5/edge2d_to_kb5.py demo is broken, in 2 ways:

  1. It tries to import PythonFunction3D from Raysect, which has moved in the latest Raysect and isn't intended to be public.
  2. It imports from cherab.edge2d, which is not a publicly available sub package of Cherab.
  1. is pretty easy to solve, as PythonFunction3D isn't used anywhere in the script so the import can just be removed. For 2), we should either make the Edge2D sub package available publicly or remove this demo from the JET package.

By the way, the cherab-edge2d package in ~mcarr/cherab/cherab_edge2d on Freia is also broken with the latest Raysect release, as Discrete2DMesh has moved. But that's not a cherab-jet issue...

Does KB1 really need a special calculate_etendue function?

There is a special calculate_etendue function for KB1, because the JET vessel acts as the aperture and so the BolometerFoil.calculate_etendue method gives misleading results (rays hitting the bottom of the vessel are not considered to have passed through the aperture). Would it not be simpler to CSG subtract the lower half of the vessel away and use the standard etendue method instead? Need to check that Subtract(Mesh, Box) works this way.

_find_nearest of JETEquilibrium crash when value is between (array[-2], array[-1])

_find_nearest will crash, if the value is between (array[-2], array[-1]), the reason is index = np.searchsorted(array, value, side="left") will make index to be the last index of the array, which results in IndexError on the following line (array[index + 1]).

I would suggest replacing this with simple:
index = np.argmin(np.abs(array - value))
It might be slower, but here the speed is not crucial and it works for any array.

Another possibility would be to add some condition for index and array shape.

Add KB3H bolometer cameras

Some channels of KB3H are still "working". Adding them might be beneficial for edge/divertor tomographic reconstructions.

Add KT3 diagnostic

KT3 is used to validate SOLPS simulations for impurity puffing. The model will be based on FibreOptic observers.

Add the possibility to omit some JET meshes

JET machine meshes are quite numerous and large and for some purposes it would be useful if the import_jet_mesh method allowed to load only a selected list of the meshes. This could be achieved by simply adding an optional parameter mesh_descriptions to the method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.