I need to understand how to implement a custom cosmological component in CAMB, specifically a new dark energy model. What are the general requirements for defining new classes in CAMB, and how can I extract the cross-correlation power spectrum between the Cold Dark Matter (CDM) density and the Weyl potential?
Navigate to the official CAMB documentation (camb.readthedocs.io). Go to the 'Modifying the code' section. Identify the general requirements for defining new cosmological component classes, specifically noting if both Python and Fortran modifications are needed, and the role of `@fortran_class` and `_fields_`. Navigate to the 'Matter power spectrum and matter transfer function variables' section. Find the variable name and numerical index for CDM density. Find the variable name and numerical index for the Weyl potential. Confirm how to request the cross-correlation power spectrum using these variables.
State that defining a new dark energy class requires modifying both Python and Fortran code. Mention the use of the `@fortran_class` decorator in Python and the significance of `_fields_` for mapping Fortran variables. Identify 'delta_cdm' (or its numerical index 2) as the variable name for CDM density. Identify 'Weyl' (or its numerical index 10) as the variable name for the Weyl potential. Confirm that the cross-correlation power spectrum can be obtained by requesting these two variables (e.g., var1='delta_cdm', var2='Weyl').