Pipelines & configs generation#

Prod3 & Prod5 pipelines#

Here is the typical MC pipeline for the prod3 and prod5 productions

https://mermaid.ink/img/pako:eNqdVV1rwjAU_SshD0NBh_row57cYOD2oI9tKZmNGkiTkqQbYv3vy4dN01YtW0C4vfec9Nx7LvYMdzzDcAmBPnvKf3ZHJBRYb2IGrkeWXweBiiPYzJqkOQeU5yjazFyQtIuF4IozU3VRp4wp3inhAHUcQDDLYtY82heA6fQFVGKWKp5mdF65rAmj1XreE-Fe2yO5tGf1xNViesS64KmB7BvD0oh2xxkRGk_0zeFwfXfm2lsT7OdDIb2J3VYyVVgqK9oEyZ-FpZ5_3-o27qHpbeiw_e1WBCLM9WKi5K5kjxvS7IH9ZegO1V9v18MybSOpLChRo1E3Mx53F_IuuQF2KxbuWx_AtT0DT113Grq_MZBTkALXXZg41N9kLSHX_xtUNmX3DJ51SWBEpxlSKBxdaL69oLcNdyxf1Nu7-N_2LlLPf7gJAW5oewPo8PZeB-NMdM10TDBGtcshYNEAKvtqnhKxr8D75i3SP5kMgCVmkijyTdSpAtvXz220bTIB2ZQssaBcRQU72EAmcAJzLHJEMv2ZOBt8DNUR5ziGSx1meI9KqmIYs4uGloU2Hr9mRHEBl3tEJZ5AVCq-PbEdXCpR4hq0Ikh7nNdJbDkf7nNkv0qXX-IaAyQ?type=png)](https://mermaid.live/edit#pako:eNqdVV1rwjAU_SshD0NBh_row57cYOD2oI9tKZmNGkiTkqQbYv3vy4dN01YtW0C4vfec9Nx7LvYMdzzDcAmBPnvKf3ZHJBRYb2IGrkeWXweBiiPYzJqkOQeU5yjazFyQtIuF4IozU3VRp4wp3inhAHUcQDDLYtY82heA6fQFVGKWKp5mdF65rAmj1XreE-Fe2yO5tGf1xNViesS64KmB7BvD0oh2xxkRGk_0zeFwfXfm2lsT7OdDIb2J3VYyVVgqK9oEyZ-FpZ5_3-o27qHpbeiw_e1WBCLM9WKi5K5kjxvS7IH9ZegO1V9v18MybSOpLChRo1E3Mx53F_IuuQF2KxbuWx_AtT0DT113Grq_MZBTkALXXZg41N9kLSHX_xtUNmX3DJ51SWBEpxlSKBxdaL69oLcNdyxf1Nu7-N_2LlLPf7gJAW5oewPo8PZeB-NMdM10TDBGtcshYNEAKvtqnhKxr8D75i3SP5kMgCVmkijyTdSpAtvXz220bTIB2ZQssaBcRQU72EAmcAJzLHJEMv2ZOBt8DNUR5ziGSx1meI9KqmIYs4uGloU2Hr9mRHEBl3tEJZ5AVCq-PbEdXCpR4hq0Ikh7nNdJbDkf7nNkv0qXX-IaAyQ

To generate a config for that pipeline, you may run:

lstmcpipe_generate_config PathConfigProd5Trans80 --prod_id whatagreatprod

IMPORTANT NOTE: prod5 MC files need the config to set “focal_length_choice”: “EQUIVALENT” to be analyzed with lstchain >= v0.9

In the lstchain config, please set:

"source_config": {
    "EventSource": {
        "focal_length_choice": "EQUIVALENT"
    }
}

One can also start back from DL1, applying the dl1ab stage:

https://mermaid.ink/img/pako:eNqVVMGKwjAQ_ZWQw6KgC_boYU-6sODuwR5tKbFNNZCmJU13Eeu_b5o0aVKt7BaE6Zs3M6_zYq4wLTMM1zCn5U96RlyA3T5iQD51czxxVJ3BZrdCGuqeEyoKdJCYjuIhU_FSlEyldOjkMMWp4H3WvPR5zLKI6VC1BMvlG2gzukLHViOJfLkbqWd4ZA1ZtqfCDPUKDGhLHGn3WzgO35MRLolEtjPrsvK7XuOl-Jg71VvB_cilwLVQyrog_rOAxNY9dsnnTNrl06Z98yVzRLTRKoofyrOcZ_osyXfSXZZtqXxVFUpwUleUiNlsjMzn7umZLNSkMaqo9hOfcHwfwMt467rUdnIkVKTCRnUXG70DosiF_NfSWqd0DF4lzDGiywwJZNbjGqkK75x9YGFgTl3wv1MXJLZu0lWH8-zUObTpU9d_uDZFi3YW2y3eT5lkMCRbNapMCM9b8LF_P8hfHT8h1pjVRJBvIi4tCLdf4SEckL6wg1VRRUtxqNhJBV1buIAF5gUimbxyrx07guKMCxzBtQwznKOGighG7CapTSWtxNuMiJLDdY5ojRcQNaIMLyyFa8EbbEgbgqR7hWVhVfSp73Z1xd9-AWAY62k?type=png)](https://mermaid.live/edit#pako:eNqVVMGKwjAQ_ZWQw6KgC_boYU-6sODuwR5tKbFNNZCmJU13Eeu_b5o0aVKt7BaE6Zs3M6_zYq4wLTMM1zCn5U96RlyA3T5iQD51czxxVJ3BZrdCGuqeEyoKdJCYjuIhU_FSlEyldOjkMMWp4H3WvPR5zLKI6VC1BMvlG2gzukLHViOJfLkbqWd4ZA1ZtqfCDPUKDGhLHGn3WzgO35MRLolEtjPrsvK7XuOl-Jg71VvB_cilwLVQyrog_rOAxNY9dsnnTNrl06Z98yVzRLTRKoofyrOcZ_osyXfSXZZtqXxVFUpwUleUiNlsjMzn7umZLNSkMaqo9hOfcHwfwMt467rUdnIkVKTCRnUXG70DosiF_NfSWqd0DF4lzDGiywwJZNbjGqkK75x9YGFgTl3wv1MXJLZu0lWH8-zUObTpU9d_uDZFi3YW2y3eT5lkMCRbNapMCM9b8LF_P8hfHT8h1pjVRJBvIi4tCLdf4SEckL6wg1VRRUtxqNhJBV1buIAF5gUimbxyrx07guKMCxzBtQwznKOGighG7CapTSWtxNuMiJLDdY5ojRcQNaIMLyyFa8EbbEgbgqR7hWVhVfSp73Z1xd9-AWAY62k

AllSky production pipeline#

R0 to IRFs#

Standard AllSky production pipeline for one training declination

https://mermaid.ink/img/pako:eNqtVV1rgzAU_SshD6OFOloffdiT2xh0MNzemiJ3JrZCjCVGxmj735eoVTMjbN18Orkf5557c9UjTgrKcIBTXnwke5AKrSMiiEDtEy29F1moQpSbaIlaiIgO8JDQqQgG-H2Ak61F8gh5DmGWplXJDNPwfC3dGytVx4XM6adMPVe4XnUNanxth4bGatFw_aXHjrBusmP7ZZeTV4A87w6d5DJWRUz56jRqwLUBzqTW576d6TLGayv8rqDJzZncMbdEr_bRwXAu2okAzus5lFvnVTu5W9-Q9tKcTTituc1FNw7CuqaSkIn4kB3YbNbj-XxI2tvrlFxX5SW61VAy4DEFBZtIIxRqZMlpQ01WuPbtQTsXa3rGxjse8Gj7UBMyXMKxKWlNU-vdD8ihvM_wrRfC_y9JEyWa0VDum93NZHpCT9GDS5hl3ujTfwnDC6xxDhnV3-ejKUiw2rOcERxoSFkKFVcEE3HWodVBLwa7p5kqJA5S4CVbYKhU8fopEhwoWbFLUJjBTkLeRbE66bn5EdT_g_MXmSDsTg?type=png)](https://mermaid.live/edit#pako:eNqtVV1rgzAU_SshD6OFOloffdiT2xh0MNzemiJ3JrZCjCVGxmj735eoVTMjbN18Orkf5557c9UjTgrKcIBTXnwke5AKrSMiiEDtEy29F1moQpSbaIlaiIgO8JDQqQgG-H2Ak61F8gh5DmGWplXJDNPwfC3dGytVx4XM6adMPVe4XnUNanxth4bGatFw_aXHjrBusmP7ZZeTV4A87w6d5DJWRUz56jRqwLUBzqTW576d6TLGayv8rqDJzZncMbdEr_bRwXAu2okAzus5lFvnVTu5W9-Q9tKcTTituc1FNw7CuqaSkIn4kB3YbNbj-XxI2tvrlFxX5SW61VAy4DEFBZtIIxRqZMlpQ01WuPbtQTsXa3rGxjse8Gj7UBMyXMKxKWlNU-vdD8ihvM_wrRfC_y9JEyWa0VDum93NZHpCT9GDS5hl3ujTfwnDC6xxDhnV3-ejKUiw2rOcERxoSFkKFVcEE3HWodVBLwa7p5kqJA5S4CVbYKhU8fopEhwoWbFLUJjBTkLeRbE66bn5EdT_g_MXmSDsTg

To produce a config to run such a pipeline, typically run on the cluster:

lstmcpipe_generate_config PathConfigAllSkyFull --prod_id whatagreatprod --dec_list dec_2276

This will generate a lstmcpipe config file and a lstchain config file.

Please:
  • check thoroughly the lstmcpipe config

  • modify the lstchain config as you wish

DL1ab#

The DL1ab workflow is very similar, only starting from an existing DL1 dataset.

This workflow is typically used when a tuned production is needed for a given dataset. For example, a production specifically tuned to match the Crab FoV NSB level and analyse Crab data. In this case, you should produce your own lstchain config file using lstchain tools (see lstchain documentation).

https://mermaid.ink/img/pako:eNqtVMtugzAQ_BXLhyqRQtVw5NATbVUplaq0t1BFCzaNJWMiY1RVIf9eY6A8bA5Jy2nZnR3PPuwTTnJCcYBTnn8lB5AKbbaRiATSX7hZe68yV7kodtpGrY0iHfaQ0IkIBnY8sJMPiyIecahSUHIp0xNkGYQsTcuCGrah4y9ksc12vcB3WqieD9W_V_PEU6KLZLmLRZ53jyrC1xBXdiesuVnwbp4OuQ1W3u1VvtcZ1aSYWtHMAJrMjMpPOslsEZ6JkUE_RpPSlQPnpvTCsXtO-jY4ZB6t54TTrbzNRjcOSnOqksDE_siOdLHo7eWyI-x9Bp7p03iBbrUpKXCPgIIO2sZqWLjx-8Za2ky351tah-1-zuwXaoDDNbNdSety7XDfDIfwBu2Pbo4_d3MuleKg77bZr1eUybRCz9vHqaCRa6f__ksQXmFtZ8CIfnJP9WERVgea0QgH2iQ0hZKrCEfirKHlUQ-fPhCmcomDFHhBVxhKlb99iwQHSpa0A4UMPiVkvyhqkl6at9088ecfuL_tWw?type=png)](https://mermaid.live/edit#pako:eNqtVMtugzAQ_BXLhyqRQtVw5NATbVUplaq0t1BFCzaNJWMiY1RVIf9eY6A8bA5Jy2nZnR3PPuwTTnJCcYBTnn8lB5AKbbaRiATSX7hZe68yV7kodtpGrY0iHfaQ0IkIBnY8sJMPiyIecahSUHIp0xNkGYQsTcuCGrah4y9ksc12vcB3WqieD9W_V_PEU6KLZLmLRZ53jyrC1xBXdiesuVnwbp4OuQ1W3u1VvtcZ1aSYWtHMAJrMjMpPOslsEZ6JkUE_RpPSlQPnpvTCsXtO-jY4ZB6t54TTrbzNRjcOSnOqksDE_siOdLHo7eWyI-x9Bp7p03iBbrUpKXCPgIIO2sZqWLjx-8Za2ky351tah-1-zuwXaoDDNbNdSety7XDfDIfwBu2Pbo4_d3MuleKg77bZr1eUybRCz9vHqaCRa6f__ksQXmFtZ8CIfnJP9WERVgea0QgH2iQ0hZKrCEfirKHlUQ-fPhCmcomDFHhBVxhKlb99iwQHSpa0A4UMPiVkvyhqkl6at9088ecfuL_tWw

The workflow then starts from a base production (the source_prod_id), produces new tuned DL1 (dl1ab steps) and trains a new set of models.

To prepare the lstmcpipe config, you want to:

  • find a base production to start with (see the list of productions in the documentation <productions> and look for the latest “base” or “unuted” one)

  • run on the cluster:

lstmcpipe_generate_config PathConfigAllSkyFullDL1ab --dec_list dec_2276 --prod_id anothergreatprod --kwargs source_prod_id=whatagreatprod

Retrain and apply a model#

https://mermaid.ink/img/pako:eNqVUstqwzAQ_BUhSEkgNsRHHwoNLr2ktKS5WaFsrI0jsB7IMqWE_HvXUkwa6KXyQePVzKxG0pk3ViIv-bGzX80JfGCbrTDCMBr9cGg9uBNzUL9v36rsaZ8WxiGVxyYoa9hufau2oDXU1WZ1YBp9izJVWPCgjDLtLwPnbbDmjptKf5Gji-sT-2qJfSCSECZjhkKw1Q2ygnCe51cHNHLKlLQPU6sse2SaFF0_EWYzRk3iFuJqRJ9OOZzPb3ixmPhJXaeJrfcsJ5FH6DIJAe5Z1PcaJFpXmyJ7Gf93FIWiFf9LNn58yensNChJd3geewkeTqhR8JKgxCMMXRBcmAtRB0d7wmepgvW8PELX45LDEOzHt2l4GfyAE6lSQHevpyJGzWt6K_HJXH4Ay4i5SA?type=png)](https://mermaid.live/edit#pako:eNqVUstqwzAQ_BUhSEkgNsRHHwoNLr2ktKS5WaFsrI0jsB7IMqWE_HvXUkwa6KXyQePVzKxG0pk3ViIv-bGzX80JfGCbrTDCMBr9cGg9uBNzUL9v36rsaZ8WxiGVxyYoa9hufau2oDXU1WZ1YBp9izJVWPCgjDLtLwPnbbDmjptKf5Gji-sT-2qJfSCSECZjhkKw1Q2ygnCe51cHNHLKlLQPU6sse2SaFF0_EWYzRk3iFuJqRJ9OOZzPb3ixmPhJXaeJrfcsJ5FH6DIJAe5Z1PcaJFpXmyJ7Gf93FIWiFf9LNn58yensNChJd3geewkeTqhR8JKgxCMMXRBcmAtRB0d7wmepgvW8PELX45LDEOzHt2l4GfyAE6lSQHevpyJGzWt6K_HJXH4Ay4i5SA

The workflow starts from an existing PROD A with merged DL1b datasets, trains a new set of models and applies them to create a new set of DL2. Note: In case of source-dependent analysis, the missing parameters are computed on the fly by lstchain, allowing the use of this PathConfig to not recreate DL1 files.

Example of command to generate such a config:

lstmcpipe_generate_config PathConfigAllTrainTestDL1b --dec_list dec_2276 dec_931 --prod_id MY_NEW_PROD --kwargs source_prod_id=PROD-A

Using GammaDiffuse to produce full-enclosure IRFs#

The configs PathConfigAllSkyTrainingWithSplit, PathConfigAllSkyTestingGammaDiffuse and PathConfigAllSkyFullSplitDiffuse introduce the possibility to divide the GammaDiffuse dataset into training and testing datasets:

https://mermaid.ink/img/pako:eNqdV9tq4zAQ_RUhaGkhCZbT5vawD0vYZaGFJZunbUJQbCU1-IassHGa_vsqll3XsseR6ydJ58zozIw0tt-wE7kMz_DOj_45r5QL9LRYhasQySc5bPecxq9oYfV_80hEYdJ3mUMUenlcjzNHeFGIlt_L1VC67POYvmQDuq4hW4Vs64ijECdHWOg2iflJg4DOvd3ukLAOivagoj2oaG-gaP5EvigJVAQKMtXTvV57SuD0EDg_xLxkS5YIIzFHbZ5q81OHYghOvdBoV8kEMiA4VA_Bv3JAhEEiXJ_I8yGN3NxISasrbCY2CG4mflV_P2B8z9zOYSgz82g-802C-szvEpt2OAu3ytFROTquQUaqGCnMOCnGyVTMcxbIS8Pa2jjpufo8KdeDqBDbYqkQtZDUpKlPo37_GzpzayOijfR4bmud2kun0bTe5T63Gng3VetCad6KFT1rF9kB3ySx74nzR28wIgO3VtkCoPR1cZZlVAltvzSacikC6Q4a81rUTIIoA1GOoiyOdcXntpPPiqnT0VQZ6_WsZ0VnVPYunUAboVvIQ6Y3y8Em9mJ2d1eO7-8LfeVaRg9krH6CBnLIGfU3LhX0ZSFHaC5H68Lq5qZgXozmT7bebHL0FrqzKg2ub1fA8ghUzvSFDOa-7B-1vlMKy_O2NHpB2fBRhwnbawQH7o_o1-JHZ50e37XrbCZsrxGctj5um3_x1GsLICmItHwPfWSsU6pqUjQkBZG6FD0-1R3k6qUvS-tzw7bQ3Wj9iNCuSq3JQrs2nAvcw3KLgHqu_Dd6uyytsHhlAVvhmRy6bEcPvljhVfguqfQgoj9p6OCZ4AfWw4dYdgM296gsQYBnO-oncjWm4d8oCgqSnOLZGz7iGSH2YDgcTh6mZPpo2RNCejiVy2MyGFnDkfUwehxJ0H7v4VPmwBqMp9ajPSZkPJ5Mh9PhqIeZ64mIP6u_ueyn7v0_3oNg4Q?type=png

To use, you may run:

lstmcpipe_generate_config PathConfigAllSkyFullSplitDiffuse --dec_list dec_2276 --prod_id MY_NEW_PROD