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

Problems with pandas slicing (again) #402

Closed
ssim opened this issue Aug 26, 2015 · 6 comments
Closed

Problems with pandas slicing (again) #402

ssim opened this issue Aug 26, 2015 · 6 comments

Comments

@ssim
Copy link
Contributor

ssim commented Aug 26, 2015

I'm seeing problems (again) when trying to use the macro atom mode - it complains:

/Users/stuartsim/Tardis/tardis/build/lib.macosx-10.10-x86_64-2.7/tardis/atomic.py:532: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  'count_total'].values[:-1])))
/Users/stuartsim/Tardis/tardis/build/lib.macosx-10.10-x86_64-2.7/tardis/atomic.py:535: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  self.macro_atom_references['references_idx'] = np.arange(len(self.macro_atom_references))
/Users/stuartsim/Tardis/tardis/build/lib.macosx-10.10-x86_64-2.7/tardis/atomic.py:537: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  self.macro_atom_data['lines_idx'] = self.lines_index.ix[self.macro_atom_data['transition_line_id']].values
/Users/stuartsim/Tardis/tardis/build/lib.macosx-10.10-x86_64-2.7/tardis/atomic.py:553: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  tmp_macro_destination_level_idx].values.astype(np.int64)

Here's the yml file I'm trying to use

tardis_config_version: v1.0

supernova:
    luminosity_requested: 9.44 log_lsun
    time_explosion: 13 day

atom_data: kurucz_cd23_chianti_H_He.h5

model:
    structure:
        type: specific

        velocity:
            start : 1.2e4 km/s
            stop : 20000 km/s
            num: 20

        density:
            type : power_law
            time_0: 2 day
            rho_0: 1e-11 g/cm^3
            v_0: 11000 km/s
            exponent: -7

    abundances:
        type: uniform
        C: 0.02
        O: 0.08
        Mg: 0.03
        Si: 0.52
        S: 0.25
        Ar: 0.04
        Ca: 0.03
        Fe: 0.01
        Co: 0.01
        Ni: 0.01

plasma:
    ionization: nebular
    excitation: dilute-lte
    radiative_rates_type: dilute-blackbody
    line_interaction_type: macroatom

montecarlo:
    seed: 23111963
    no_of_packets : 5.0e+4
    iterations: 10
    last_no_of_packets: 1.0e+5
    no_of_virtual_packets: 5

spectrum:
    start: 500 angstrom
    stop: 20000 angstrom
    num: 10000

This sounds like a similar sort of thing to what was in #105 #110 , which had been resolved (I thought). Can someone who knows about pandas @wkerzendorf @aoifeboyle have a look into this?

@aoifeboyle
Copy link
Contributor

@ssim Yeah I've seen this before and it doesn't actually affect the running of the code but it is annoying. I haven't seen it with the current code though - has it just started happening? Leave it with me and I'll have a look.

@ssim
Copy link
Contributor Author

ssim commented Aug 26, 2015

Hi - yes, it just happened with me. I'm not 100% uptodate, perhaps - but I did update all my python packages and TARDIS last week so I think it's a "current" problem! :)

@wkerzendorf
Copy link
Member

@ssim @aoifeboyle yes, I have to fix this. I've made the executive decision that pandas==0.16 is the new minimum version and it remains executive until someone bitterly complains.

@wkerzendorf
Copy link
Member

and yes, I'll deal with it.

@ssim
Copy link
Contributor Author

ssim commented Aug 26, 2015

I have version 0.16.2 installed and get this error

@ssim
Copy link
Contributor Author

ssim commented Aug 28, 2015

Resolved by #403 #405

Closing.

@ssim ssim closed this as completed Aug 28, 2015
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

3 participants