-
Notifications
You must be signed in to change notification settings - Fork 4
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
selfcal-make_sourcedb_target error: 'endPtr == str+end; false is not a floating point value' #32
Comments
How does your skymodel
look like? |
Here's the top of the file:
It has ~5600 sources. I can upload the whole file if that would be helpful - just let me know. |
I ran into this a while ago - the 'LogarithmicSI' value is a sky model feature that is readable in the newer version of makesourcedb, that (at least to my knowledge) has not been incorporated into the lofar software release yet. But the feature is already in the LSMtool release. Francesco had been testing newer versions of NDPPP and makesourcedb in his dd pipeline which is how I ran across it back in May. In his scripts there is 'ft_model_wsclean' and 'ft_model_cc', and I think PiLL is using the sky model filter method from the latter function, which in turn uses LSMtool. The 'wsclean' version uses PyBDSM/F to create a mask from the image as oppose to using the clean components from wsclean, hence LSMtool is not used. So I believe you could either downgrade LSMtool (I think the change came in around April) or create a toggle and add the other method in the PiLL script filter_model.py while the newer version of makesourcedb is not available. EDIT: I meant to say that downgrading LSMtool may create other issues so getting the other method in there might be the safer option for now. |
I see. |
Ah yes that |
for the DD cal pipeline LSMtool 1.2 is required, maybe also for the selfcal part (but only if you use the clean component predict) |
I'm using the most up-to-date LSMtool from github. I think the makesourcedb executable is from the LOFAR bundle (2.20 I think), however. Do you know which version of the LOFAR software has an appropriately up-to-date makesourcedb? Or does that not exist yet? As for downgrading LSMtool to 1.1....I'm not actually sure how to do that?? Is that really the best/only way around this error? |
The newer makesourcedb is not released yet (again, as far as I'm aware). How did you install LSMtool into your environment? For example I always use pip to install so it's just a case of pip uninstall. If you did Though I see 1.2 is the first 'release' on GitHub, the commit you want to avoid is Edit: |
I installed it using the |
I haven't personally rolled back yet as I was using Francesco's scripts and just switched to the Edit: Plus Alexander reports that it runs ok for him with 1.1. |
I rolled back the LSMTool version ( |
Looking at it I believe you need to roll the pipeline back one step (assuming this is Step 15 in the selfcal.parset, the first case of makesourcedb). It needs to run Step 14b again - the |
I tried that, and then I tried removing the statefile entirely when the |
Ah ok, maybe it comes earlier then. In your original error at the beginning it is the filter model that it trips up on:
This LogarithmicSI column is in a sky model that is being attempted to be run through makesourcedb, the sky model will look like that below. But this column is only there in sky models that are created using the LSMtool (after the April update). I haven't run a new PiLL run yet so I can't see for myself, perhaps @adrabent can confirm exactly what sky model is attempted to be used. It should just be a case of replacing that sky model with the column removed (i.e. running filter model again with the original model with the old LSMtool).
|
Ok I've looked deeper into this as something didn't seem right and I've got the origin wrong:
I'm very sorry for the confusion! |
@mknapp55 - I've written a potential fix for this by including an option to remove the LogarithmicSI column in the filter_model.py script that is called. See the branch here: https://github.com/ajstewart/PiLL/tree/temp-fix-for-LogarithmicSI Note that only that script and the selfcal.parset is changed, with the latter only adding three lines to turn on the option. As you have a processed run up to that point, you could firstly test the filter_model.py script manually by copying the sky model generated from wsclean along with the mask and the ms file somewhere and running just the script to see if it generates the model as expected (I believe you're looking for If it works then if you could test it in the pipeline environment that would be great, the first filter_model is the step to go from. It will take me a few days to catch up with a pipeline to test it myself. |
@ajstewart I'm working with your modified
|
Sorry for the minor bug I changed the name of the function last minute so I'm not surprised I missed something - I also see it now. That looks like an import error on something not to do with my edits - possibly to do with the Edit: By 'these' I mean
to the normal import bit. If running in the same environment as PiLL works I'm not sure why the script running standalone wouldn't import properly. |
For reference, this is what I get in the pipeline framework using the script with the args bug fixed:
|
Ok this:
is an error from LSMtool - which version are you using of that? Did you upgrade back to the latest version as that one should allow the column and avoid this error. |
Moving the import statement to the top and hardcoding the location of 'scripts' yields another
In the pipeline framework, upgrading back to the most recent LSMTool yielded this:
Progress! |
Check the version I just pushed, just an edit to pass the logger from the main() to the delete_column(). Must be something in how the function is called within the generic pipeline. That should get past that one... I hope. As for getting it to run manually that seems strange at the moment! I guess concentrate on the pipeline environment for now. |
Ok, that version runs through. It gives a lot of errors about strange sources, though...
|
Hmm interesting could you email me your sources list from WSClean please? I was using one that was produced from one of my images but maybe it's not up-to-date or representative of what could be in it. At least we know it can run the function now! Nearly there. |
I assume you mean the input skymodel (the .txt file)? |
Sorry, yes that's the one. |
The text was updated successfully, but these errors were encountered: