Giter Site home page Giter Site logo

Comments (2)

HealthyPear avatar HealthyPear commented on September 23, 2024

Further information:

  • this happens because the file is a La Palma-prod3b file containing also Flashcam
  • using files such as this will crash also in the latest development version
  • this bug is complementary to issue #23

from protopipe.

HealthyPear avatar HealthyPear commented on September 23, 2024

Update:

The cam_id_list key in the analysis.yml configuration file is used only to call the cam_ids for the estimators (one model per camera type). This means that it is completely useless in the rest of the code. Regarding --cam_ids, I am afraid that it is totally useless (I can't find it used anywhere in write_dl1.py).

What happens is that, when an ImageCleaner object is initialized, it checks which are the cameras listed in the image cleaning part of the configuration file. Since we never used Flashcam, the script will eventually crash if it doesn't find a camera that is in the simtel file.

Proposed solution:

There are a couple of nice built-in functions in ctapipe to manipulate subarrays, which have never been used probably because this part of protopipe was coded before.

For example, given a generic Paranal simtel file,

# Select all telescopes
In [22]: subarray
Out[22]: SubarrayDescription(name='MonteCarloArray', num_tels=567)
# Get the tel_ids of the LST subarray
In [15]: subarray.get_tel_ids_for_type("LST_LST_LSTCam")
Out[15]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
# Build a custom array
In [25]: custom_array = subarray.select_subarray("custom_array", [1, 35, 90])
# Get only the cameras really involved
In [26]: [camera.cam_id for camera in custom_array.camera_types]
Out[26]: ['FlashCam', 'NectarCam', 'LSTCam']

Given PR #29 we can:

  • implement the tools above in protopipe.pipeline.utils, thus making the cam_id_list key in the config file obsolete and give the list of cameras also to ImageCleaner so only the necessary objects get initialized,
  • retain the camera radius part, which is necessary for the moment,
  • add the missing cameras to the image cleaning section of analysis.yaml (removing the dl1_test.yaml), giving them dummy values

This should make all cases runnable, but we continue to work only on LSTCam + NectarCam for the moment. If any new developer wants to test other cameras will be more than welcomed by updated documentation (see issues #23, #27).

from protopipe.

Related Issues (20)

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.