Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError error when linking #112

Open
cphyc opened this issue Jan 17, 2020 · 1 comment
Open

TypeError error when linking #112

cphyc opened this issue Jan 17, 2020 · 1 comment

Comments

@cphyc
Copy link
Contributor

cphyc commented Jan 17, 2020

I am using tangos + pynbody + RAMSES and running into the following error:

2020-01-17 15:37:55,143 : generating pairs of timesteps
2020-01-17 15:38:27,150 : Linking <TimeStep 'delete_me/output_00101' z=0.34 t=9.58 Gyr> and <TimeStep 'delete_me/output_00102' z=0.33 t=9.69 Gyr>              
2020-01-17 15:38:27,181 : Gathering halo information for <TimeStep 'delete_me/output_00101' z=0.34 t=9.58 Gyr> and <TimeStep 'delete_me/output_00102' z=0.33 t=9.69 Gyr>                                                                                                                                                      
2020-01-17 15:43:07,808 : Exception during attempt to crosslink timesteps <TimeStep 'delete_me/output_00101' z=0.34 t=9.58 Gyr> and <TimeStep 'delete_me/output_00102' z=0.33 t=9.69 Gyr>                                                                                                                                     
Traceback (most recent call last):                                                                                                                             
  File "/home/ccadiou/codes/tangos/tangos/tools/crosslink.py", line 138, in crosslink_ts                                                                       
    output_handler_for_ts2=output_handler_2)                                                                                                                   
  File "/home/ccadiou/codes/tangos/tangos/input_handlers/pynbody.py", line 322, in match_objects                                                               
    only_family=pynbody.family.dm, groups_1=h1, groups_2=h2)                                                                                                   
  File "/home/ccadiou/.conda/envs/python3/lib/python3.7/site-packages/pynbody/bridge/__init__.py", line 124, in fuzzy_match_catalog                            
    transfer_matrix = self.catalog_transfer_matrix(min_index,max_index,groups_1,groups_2,use_family,only_family)                                               
  File "/home/ccadiou/.conda/envs/python3/lib/python3.7/site-packages/pynbody/bridge/__init__.py", line 180, in catalog_transfer_matrix                        
    g1 = groups_1.get_group_array(family=only_family)[restriction_start_indices]                                                                               
TypeError: get_group_array() got an unexpected keyword argument 'family'                                                                                       
2020-01-17 15:43:07,864 : Linking <TimeStep 'delete_me/output_00102' z=0.33 t=9.69 Gyr> and <TimeStep 'delete_me/output_00103' z=0.32 t=9.77 Gyr>              
2020-01-17 15:43:07,896 : Gathering halo information for <TimeStep 'delete_me/output_00102' z=0.33 t=9.69 Gyr> and <TimeStep 'delete_me/output_00103' z=0.32 t=9.77 Gyr>    ```
@apontzen
Copy link
Member

It looks like the halo catalogue hasn’t implemented get_group_array for individual families. I assume this is using the AdaptaHOP catalogues? See https://github.com/pynbody/pynbody/blob/master/pynbody/halo/__init__.py#L208 for how it is handled with regular HOP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants