Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

ATIK OSX Drivers R1.00 & Example App


NickK

Recommended Posts

I've sorted the contention issue that impacted performance. I have two more things and I'll release an alpha2.. not much I can see till beta :)

Here's the titan running at 15fps whilst TheSky's sky atlas is running at the requested 25fps on the little mac mini C2D..

post-9952-0-48679500-1421324656.jpg

Link to comment
Share on other sites

  • Replies 198
  • Created
  • Last Reply

TheSkyX Plugin R1.40 Alpha 2 Release: ATIK TheSkyX Plugin R140 Alpha2.zip

Changes:

* Corrected ATIK 414ex & 4120ex camera detection - these should now work (wrong USB ids.. sorry folks :D)

* TheSkyX performance should be vastly better due to new code to resolve locking contention with cameras and filter wheels.

* The Progress bar should now count down - note that the last 0.07 seconds may appear to freeze as this is the download occurring but there’s no current way to indicate that this to TheSkyX using the X2 API without changes in the driver.

Same README about liability, installation and uninstall options.

Area that is weak in terms of testing: ATIK One's embedded Filterwheel.

Other than that - have fun and enjoy (once the clouds, rain and wind disappear!) :D

Link to comment
Share on other sites

Hot on the heals for Alpha 2 is R1.41 Alpha3 with two fixes:

* Setpoint cooling - fixed as it seemed that the slowness of the mini was masking a race condition. TSX was calling to disable cooling on startup this triggered a warmup cycle that then caused a problem with the setpoint that was called immediately after (set pointing is set then the cooler is on for ATIK). I have a little work todo here but I think this needs a change think so warmup will be added back in for Alpha4.. but for now setpoint works. 

* ATIK One filter wheel - bug fix in detecting the filter wheel - testing ongoing at this point for this one but please try it and feed back

R1.41 Alpha3 Plugin:  ATIK TheSkyX Plugin R141 Alpha3.zip

Link to comment
Share on other sites

TheSkyX ATIK Plugin R1.42 Beta Release: ATIK TheSkyX Plugin R142 Beta.zip

Changes since Alpha3:

* Camera warmup if enabled on Disconnect button in TheSkyX (missed this one in the release notes :))

* Multiple EFW2 support added - you can now select the specific EFW2 from the settings combo box.

* All cameras now have their location in brackets after their name - this makes things unique

* Bugfix: I'd assumed that all cameras after the ATIK One would have filter wheels, this is not the case and so the driver would create for an internal filter wheel for an ATIK 414EX. Only if you had a 414EX or 4120EX would you have noticed this.

* Bugfix: Filterwheel filter selection now correct.. TSX asks for 0 to N-1.. however it was only by blind luck that the internal numbering of the EFW2 was 0 to N-1. However if you asked the driver for filter 1.. it gave filter 2. Now corrected the two wrongs make a right in the new C++ code.

* Debug trace is now OFF by default - so if the log file still appears then uncheck option in the ATIK Plugin > Settings > Driver > Enable Debug... window.

I decided to move to Beta as the plugin is pretty reliable now. 

For Beta Plugin... 

At some point I'll find a way to make an Installer - the Apple development tools can't easily create an Installer to add the plugin bits into the TheSkyX's application package. Long exposure temperature updates

Guider testing (Titan and Legacy 16IC cameras).

I've done the developer architecture guide ahead of the C++ driver release. There's some work around async that will be added later but that's looking good for an OS X C++ driver release.

I've also attempted to port the C++ driver and plugin to Linux.. this is slow progress due to Linux and it's 1970s approach to makefiles.. I'm exploring Eclipse CDT's make system but that seems to still require text makefiles.. (you can probably tell I'm impressed)

Link to comment
Share on other sites

In other news.. I spent an hour looking how much integration would be required for OpenPHD with the new C++ drivers. It's looking good on this.

I will sort out a basic form of integration today, hopefully, then *fingers crossed* the predicted clear spot for pm should allow some dog fooding..

Link to comment
Share on other sites

Oh the joys of getting OpenPHD2 building on 10.10... when all the libraries have to have some adjustments..

Anyway... getting there slowly.. but I will soon have to switch from dev mode to AP mode :D

Link to comment
Share on other sites

This is great, you're releasing updates more regularly than I get clear skies :) The next clear sky I get you'll probably have released TheSkyX ATIK Plugin R2.9 and be looking for ideas as to what to put in R3.. :)

James

Link to comment
Share on other sites

This is great, you're releasing updates more regularly than I get clear skies :) The next clear sky I get you'll probably have released TheSkyX ATIK Plugin R2.9 and be looking for ideas as to what to put in R3.. :)

James

:p:D The rate of updates will slow down now.. basically as people use it and find issues then I'll bundle up the fixes.. the enhancements will just be added in as we go.

Well OpenPHD is *almost* building  (the dependencies here are a problem as I'm compiling for 64bit.. not 10.6.8 32bit!). I've coded up a new camera class in it and that seems ok (it compiles).. so it's all linking the bits together in the final step of making the application.

Link to comment
Share on other sites

All :)

Legacy: Artemis 285, Artemis 429, Artemis 16, Artemis 16HR, ATIK 16IC, ATIK 16IC-S, ATIK 16IC-C

Note these cameras need an FTDI 2XX driver for the platform (but that's supported on many platforms) and the driver can spoof the now defunct FTDIChipID library so that's not a hinderance.

Modern:

300 series: ATIK 314L+, ATIK 314E, ATIK 320E

400 series: ATIK 414EX, ATIK 420, ATIK 428EX, ATIK 450, ATIK 460, ATIK 460EX, ATIK 490EX, ATIK 4120EX

Fullframe: ATIK 383L+, ATIK 4000M, ATIK 11000M

Combined: ATIK One 6.0, ATIK One 9.0

Highspeed: Titan

Filter wheel: EFW2 (in theory EFW1 but not tested)

The driver has two main API variants but both share the same C++ core (hence the core is very mature):

* Objective-C++ framework where the driver management of USB and HID are pure OS X IOKit and the bottom transports for USB and HID are also pure IOKit (except legacy - FTDI 2XX).

* C++ dynamic library where the driver management and bottom transports of USB and HID use libusb. Thus portable wherever libusb can go. These new bits are still beta but the core is mature so no worries with that.

Applications in development:

* ExampleApp that uses the Objective-C++ API. This is released and is stable, although will now get an update for the protocols for the application API inline with the C++ enhancements.

* TheSykX OSX/Ubuntu Plugin that use the C++ API. This is in Beta and is very usable. I've been using this for dogfooding the C++ drivers.

* OpenPHD2 that uses the C++ API. This is coded, it's compiled but I'm sorting out some x86_64 linking dependences (mainly other camera manfacturer libraries being 32bit only)

* Nebulosity uses the Objective-C++ interface currently in Craigs Beta version.

Link to comment
Share on other sites

Objective-C, no functional swift :-) You know you want to ;-)

Based on my experience with apple.. I'd wait a year or two first.. nothing like finding their own bespoke language gets dropped in favour of something else.

There's probably an GNU/LLVM functional language somewhere.. At uni we used to convert english into maths (Z), formally prove the schemas, then via guarded command language convert into ADA.. nice fast development cycle there ;)

 Z shares more with set theory: http://en.wikipedia.org/wiki/Z_notation so in the end I tend to think in mathematical sets and visualise software in flows like tree trunks splitting into branches etc.

I also did look at what it would take to add true parallel (i.e. GPGPU) into the GNU compiler chain back in 2005. However, it became clear that the entire GNU compiler chain is build in 1970s fashion.. even the trees within it (not language dependant) are procedural and there's no real perspective to support set based data dependancies. Ie you can't express something in data sets - it's all if X then Y procedural, regardless of the GNU language.

What amazes me is that people state Erlang as being great and nothing like C.. however it makes some fundamental mistakes such as not treating data as sets.. but instead supports lists.. actually a list is a set where each tuple is a mapping between the list position and the object.. i.e.{1->object ... it shows that deep down there's still a non-data driven engine within erlang that will have problems scaling or working in a true parallel nature.

Link to comment
Share on other sites

So... OpenPHD2...

post-9952-0-96851000-1422029731_thumb.pn

Still need to work out why it's getting the interesting pattern.. probably the copy of the image within OpenPHD that's part of the old ATIK16 class that I used as a template..

However to get this screen shot.. (long list for this one)

* OpenPHD2 running 64bit on 10.10.1

-> wxWidget (latest svn build), cfitsio, HIDUtilities library, usblib.. all compiles sorted for 64bit and dynamic libraries in the OpenPHD application.. (none of this /usr/lib install nonsense) sorting out all the new dependencies and that they needed some development rework...

So this is using the new ATIK C++ driver - the same driver that TheSkyXPlugin operates with. I could use a 16IC, Titan, or even a 11000M as a guider :)

I still have some work todo.. namely sorting out the camera selection ("universal") at the moment..

Link to comment
Share on other sites

Hmm noted last night that the PI ABE had removed some signal along with the background :/ hence why it's looking at little noisy. 

I tried running the OpenPHD on my MBP - it showed there's a Apple application shared library search issue - this is normal issues, and can be sorted by install_tool during build so once done you'll not need to even install any libraries etc as the app will be completely self contained. I started last night but was out of time :/

Link to comment
Share on other sites

I've updated the library references - this *should* work without needing anything more.. I've used the name tool to adjust the dynamic library references to point to the correct internal versions so when you run PHD it should just work.

OpenPHD2 v2.4.1c OSX 10.10.1 64bit with ATIK support: PHD2_ATIK_OSX_10_10_64bit.zip

I'd be interested in any crash reports. I've tested it on two macs so fingers crossed I don't have any external references that will cause a problem.

Link to comment
Share on other sites

Just looking at the astrometry.net code.. I'm thinking ... they use the cairo library that has an OpenGL back end.. wouldn't it be great if... :)

It would be good to have something for SGLX.. that way I won't accidentally target something slightly out of view of the target :D

Link to comment
Share on other sites

ATIK OSX R1.43 Driver Release (Beta for C++ variant)

Built on a 10.10.1 64 bit mini using Xcode 6.. but set for Universal.

R1.43 C++ dynamic library + dependancies: ATIKOSX R1.43 C++ Drivers.zip

In this zip the follow files exist

* usr/include - include files for the C++ driver

* libATIK.dylib - C++ Modern driver itself

* libLegacyATK.dylib - C++ Legacy driver itself

* libusb-1.0.0.dylib - both drivers above use this

* libftdi2xx.1.2.2.dylib - legacy driver dependency

* libhidapi.dynlib - HID library although this will be removed in the next version (going through libusb instead)

Or for those coding against Objective-C++

R1.43 Objective-C++ Modern Drivers framework: ATIKOSXDrivers.framework.zip

R1.43 Objective-C++ Legacy Drivers framework (requires modern): ATIKOSXLegacyDrivers.framework.zip

Note - these don't use libusb but use native IOKit operations directly.

An application developer's guide to the new drivers (talks more about threading models): Application Developer.pdf
Next steps
* Addition of some of the passive search abilities found in the C++ library to be added to the Objective-C++ frameworks
* Active Proxies being available by request from the C++ drivers (these are discussed in the application developer PDF).
* Enhance the header files with a bit more info..
One of the nice things about the C++ driver is the enhancement of passive mode searching. This means you don't communicate with the camera and so it allows the driver to return prospective lists of matches to you based on the model or wildcard 'kATIKModelModernAnyCamera' for example.
Here's an excerpt from the OpenPHD2 code to illustrate:
    _driversModern = new ATIKLinuxDrivers();    _driversModern->startSelectiveSupport();    _driversLegacy = new ATIKLinuxLegacyDrivers();    //    Logger::globalLogger("ATIKUniversalDrivers");    //    Logger::setDebugLogging(false);    //    Logger::important("OpenPHD2 instantiated driver instance");    _driversLegacy->startSelectiveSupport();
    if( _userSelectedBusId==0 ){                // build list of modern and legacy cameras        // how the FTDIChipID would work here - that's something for later..        // for the moment we're only going to ask for guider models..                        // Find available cameras        // build a list of potential ATIK devices without connecting to them...                int i=-1, index=0;        wxArrayString usbATIKDevices;        uint16_t addresses[1024];                // we know the camera we're looking for is a modern..        //    PotentialDeviceList* modernList = _driversModern->scanForPerspectiveServices(kATIKModelATIKTitan);        PotentialDeviceList* modernList = _driversModern->scanForPerspectiveServices(kATIKModelModernAnyCamera);        if( modernList->size() >0 ) {            for(PotentialDeviceListIterator it=modernList->begin(); it!=modernList->end(); ++it) {                // because c++ string streams are ugly (although printf isn't particularly safe..)                addresses[index]=it->first;                char tempString[1024];                sprintf(tempString,"%s (usb location 0x%04x)",it->second.c_str(),it->first);                wxString wxS = wxString(tempString);                usbATIKDevices.Add(tempString);                index++;            }        }        int legacyIndex = index;        PotentialDeviceList* legacyList=_driversLegacy->scanForPerspectiveServices(kATIKModelLegacyAnyCamera);        for(PotentialDeviceListIterator it=legacyList->begin(); it!=legacyList->end(); ++it) {            // because c++ string streams are ugly (although printf isn't particularly safe..)            addresses[index]=it->first;            char tempString[1024];            sprintf(tempString,"%s (usb location 0x%04x)",it->second.c_str(),it->first);            wxString wxS = wxString(tempString);            usbATIKDevices.Add(tempString);            index++;        }                if(index==1)            i=0; // one camera connected        else if (index==0)            return true; // no cameras.        else {            i = wxGetSingleChoiceIndex(_("Select camera"),_("Camera name"), usbATIKDevices);            if (i == -1) {                Disconnect();                return true;            }        }                _isLegacy = i>=legacyIndex;        _userSelectedBusId = addresses[i];            }        // add and claim camera    ServiceInterface* service=NULL;        if(!_isLegacy) {        _driversModern->supportCameraIdentifiedByBusAddress(_userSelectedBusId);        Services* serviceMgmt = _driversModern->serviceManagement();        ServiceIdentityList* available = _driversModern->availableServices();        // Check for modern camera        if( available->size() != 0) {  // May have found a legacy device            for(ServiceIdentityListIterator it=available->begin(); it!=available->end(); ++it) {                std::string deviceIdentity = it->first;                std::string protocol = it->second;                if( protocol == "Imager100" ) { // in theory this should be Imager101 but for now this is 100.                    //bIsLegacy = false;                    service = serviceMgmt->claimService(deviceIdentity);                    break;                }            }        }    } else {        _driversLegacy->supportCameraIdentifiedByBusAddress(_userSelectedBusId);        Services* serviceMgmt = _driversLegacy->serviceManagement();        ServiceIdentityList* available = _driversLegacy->availableServices();        // Check for modern camera        if( available->size() != 0) {  // May have found a legacy device            for(ServiceIdentityListIterator it=available->begin(); it!=available->end(); ++it) {                std::string deviceIdentity = it->first;                std::string protocol = it->second;                if( protocol == "Imager100" ) { // in theory this should be Imager101 but for now this is 100.                    //bIsLegacy = false;                    service = serviceMgmt->claimService(deviceIdentity);                    break;                }            }        }    }            if(service==NULL) {        wxMessageBox(wxString::Format("Filed to connect to ATIK Camera (Driver version %s)",_driversModern->version()));        return true;    }        //    _imager=dynamic_cast<Imager100*>(service);        // now have our camera all ready...        // update properties    //    FullSize = wxSize(pProp.nPixelsX,pProp.nPixelsY);    //    //  PixelSize[0]=pProp.PixelMicronsX;    //    ArtemisBin(Cam_Handle,1,1);    //    ArtemisSubframe(Cam_Handle, 0,0,pProp.nPixelsX,pProp.nPixelsY);    //    HasShutter = false; // (pProp.cameraflags & 0x10)?true:false;        Name = _imager->uniqueIdentity();        FullSize = wxSize(_imager->xPixels(), _imager->yPixels());        // PHD assumes square pixels    PixelSize = _imager->yPixelSize();        HasPortNum = false;    HasDelayParam = false;    HasGainControl = false; // could use this to engage preview?    HasShutter = false;    HasSubframes = true;        // set cooling..

In the above example, this is using the passive scans to locate all the cameras and providing a list of cameras to the user (that's the wxStringArray etc) and then later it's making a selection by using "supportCameraIdentifiedByBusAddress()" to make the driver provide a single camera support - note if the camera moved location then the camera would no longer be supported.

Then the camera is initialised and made available to the application as an Imager100 service.

Once finished, the application can release the camera back and even end support for the location.

There's a little more work todo - however I think the next step is complete the port to Linux.

Link to comment
Share on other sites

Ok next plans for R1.44 - this will be a full release with theskyplugin too:

* Bugfix: ATIK One filter wheel.. there's a startup issue with the filter wheel being in transition when the camera starts, the fix here simply checks to see if the filter wheel has completed it's initialisation before returning from the camera initialisation - ATIK are testing my fixes on this so this should be complete in the next few days.

* Enhancement: make active proxies available through the C++ application interface.

In parallel - these are likely to appear in R1.45/R1.46:

* start building makefiles for the ubuntu drivers - I'll make the linux drivers shared libraries too.

* OpenPHD2 testing - hopefully a clear spot one night this week, even if it's just for a short period for guider testing only.. then move this code update back to the OpenPHD folks. I may even ask for a branch for people to take. In theory the GP guider should work with this 'out of the box' but I wanted to get the initial integration before tackling that particular library as it didn't build properly for me..

* Passive search on Objective-C++ interface.

* ATIK GP guider support - I can't guarantee this will work great but I'll have a bash - the guider will then appear as a standard camera in the drivers.

I also got my astrometry.net build working :) So that'll be available for SGLX...
Link to comment
Share on other sites

Well there's a clear spot.. so time to dogfood OpenPHD2 with the ATIK drivers :) This will be controlled via EQMac and a USB EQ6 EQMOD hardware. Even if there's a bit of cloud.. the idea is to test the guiding :) fingers (frozen) crossed.

I've been working with ATIK on testing the ATIK One.. that's progressing nicely although not complete yet.

Link to comment
Share on other sites

So here is the first even OpenPHD2 ATIK on OS X guiding the EQ6..

post-9952-0-41675800-1422475786_thumb.pn

Seems that my titan's back focus needs tuning and my 16IC is playing not nice atm I think that TheSkyX and OpenPHD on the same poor mac mini is a problem :D

post-9952-0-28795200-1422475980_thumb.pn

Ok and here's the FHWM..

post-9952-0-67620800-1422476738_thumb.pn

It's only taken since Jun 2011 to get to this point.. all on mac.. SGLX may be quite fun :) (spot the gust of wind in the graphs)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.